aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/drm.c5
-rw-r--r--common/evdev.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/common/drm.c b/common/drm.c
index 4b70b64..3234e81 100644
--- a/common/drm.c
+++ b/common/drm.c
@@ -1,7 +1,10 @@
#include <sys/ioctl.h>
-#include <sys/sysmacros.h>
#include <sys/types.h>
+#ifdef __linux__
+#include <sys/sysmacros.h>
+#endif
+
#include "drm.h"
// From libdrm
diff --git a/common/evdev.c b/common/evdev.c
index fe6922d..f3b39c6 100644
--- a/common/evdev.c
+++ b/common/evdev.c
@@ -1,9 +1,16 @@
-#include <linux/input.h>
#include <stdlib.h>
#include <sys/ioctl.h>
-#include <sys/sysmacros.h>
#include <sys/types.h>
+#if defined(__linux__)
+#include <linux/input.h>
+#include <sys/sysmacros.h>
+#elif defined(__FreeBSD__)
+#include <dev/evdev/input.h>
+#else
+#error Unsupported platform
+#endif
+
#include "evdev.h"
int evdev_revoke(int fd) {