udev-builtin-input_id.c: add missing kernel header defines.

Add missing defines so eudev builds for older kernels such as 2.6

Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
This commit is contained in:
Gustavo Sverzut Barbieri 2016-12-30 11:28:41 -02:00
parent 29f9e04a96
commit c0f63850ad
2 changed files with 9 additions and 0 deletions

View File

@ -171,3 +171,11 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
(char *)memcpy(__new, __old, __len); \ (char *)memcpy(__new, __old, __len); \
}) })
#endif #endif
#ifndef BTN_TRIGGER_HAPPY
#define BTN_TRIGGER_HAPPY 0x2c0
#endif
#ifndef INPUT_PROP_MAX
#define INPUT_PROP_MAX 0x1f
#endif

View File

@ -32,6 +32,7 @@
#include "udev.h" #include "udev.h"
#include "util.h" #include "util.h"
#include "missing.h"
/* we must use this kernel-compatible implementation */ /* we must use this kernel-compatible implementation */
#define BITS_PER_LONG (sizeof(unsigned long) * 8) #define BITS_PER_LONG (sizeof(unsigned long) * 8)