Commit cb3e85fe authored by Jiri Kosina's avatar Jiri Kosina

HID: hidraw: fix samples miscompilation

On systems where userspace doesn't have new hidraw.h populated to
/usr/include, the hidraw sample won't compile as it's missing the new
ioctl defitions.

Introduce temporary ugly workaround to define the ioctls "manually"
in such cases, just to avoid miscompilation in allmodconfig cases.
Reported-by: default avatarStephen Rothwell <>
Signed-off-by: default avatarJiri Kosina <>
parent 1a978c50
......@@ -14,6 +14,17 @@
#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.
#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
/* Unix */
#include <sys/ioctl.h>
#include <sys/types.h>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment