mirror of
https://github.com/CTCaer/hidapi.git
synced 2024-11-23 10:09:46 +00:00
Add ioctl definitions
Added the HIDIOCSFEATURE and HIDIOCGFEATURE ioctl macros to hid.c so that it will compile with older kernel headers. This of course doesn't make it _run_ with older kernels. Some distros ship older kernel headers than the running kernel.
This commit is contained in:
parent
781efae694
commit
8066251aa8
@ -44,6 +44,15 @@
|
||||
|
||||
#include "hidapi.h"
|
||||
|
||||
/* Definitions from linux/hidraw.h. Since these are new, some distros
|
||||
may not have header files which contain them. */
|
||||
#ifndef HIDIOCSFEATURE
|
||||
#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
|
||||
#endif
|
||||
#ifndef HIDIOCGFEATURE
|
||||
#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
|
||||
#endif
|
||||
|
||||
struct hid_device_ {
|
||||
int device_handle;
|
||||
int blocking;
|
||||
|
Loading…
Reference in New Issue
Block a user