diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-02-15 18:56:38 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-02-15 18:56:38 +0100 |
commit | 3cf16adf3c9d83303989e4281010919a5696b4b8 (patch) | |
tree | b943e39252af0f9718027fcd2decd6712bd29f0a /platform | |
parent | ad405ade17630c927e06530dbbaad4e730193774 (diff) | |
parent | 306518730078c0e4d8beb6d5d9afb90437de437f (diff) |
Merge pull request #3715 from Hinsbart/libudev_include
X11: include libudev only on udev builds
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/joystick_linux.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joystick_linux.cpp index 9fd19a767e..9a52c4ff36 100644 --- a/platform/x11/joystick_linux.cpp +++ b/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) |