HID: hidraw: fix samples miscompilation
[pandora-kernel.git] / samples / hidraw / hid-example.c
index 40e3d62..816e2dc 100644 (file)
 #include <linux/input.h>
 #include <linux/hidraw.h>
 
+/*
+ * Ugly hack to work around failing compilation on systems that don't
+ * yet populate new version of hidraw.h to userspace.
+ *
+ * If you need this, please have your distro update the kernel headers.
+ */
+#ifndef HIDIOCSFEATURE
+#define HIDIOCSFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
+#define HIDIOCGFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
+#endif
+
 /* Unix */
 #include <sys/ioctl.h>
 #include <sys/types.h>