Просмотр исходного кода

Merge pull request #3715 from Hinsbart/libudev_include

X11: include libudev only on udev builds
Rémi Verschelde 9 лет назад
Родитель
Сommit
3cf16adf3c
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      platform/x11/joystick_linux.cpp

+ 4 - 1
platform/x11/joystick_linux.cpp

@@ -33,11 +33,14 @@
 #include "joystick_linux.h"
 
 #include <linux/input.h>
-#include <libudev.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 
+#ifdef UDEV_ENABLED
+#include <libudev.h>
+#endif
+
 #define LONG_BITS  (sizeof(long) * 8)
 #define test_bit(nr, addr)  (((1UL << ((nr) % LONG_BITS)) & ((addr)[(nr) / LONG_BITS])) != 0)
 #define NBITS(x) ((((x)-1)/LONG_BITS)+1)