1 #ifdef HAVE_CONFIG_H
2 # include "config.h"
3 #endif
4 #include <fcntl.h>
5 #include <stdint.h>
6 #include <unistd.h>
7 #include <termios.h>
8 #include <sys/ioctl.h>
9
10 #ifdef HAVE_LINUX_MMTIMER_H
11 # include <linux/mmtimer.h>
12 #endif
13 #ifdef HAVE_LINUX_HIDDEV_H
14 # include <linux/hiddev.h>
15 #endif
16 #ifdef HAVE_LINUX_INPUT_H
17 # include <linux/input.h>
18 #endif
19
20 #if defined MMTIMER_GETRES \
21 && defined HIDIOCGVERSION \
22 && defined HIDIOCGPHYS \
23 && defined EVIOCGBIT \
24 && defined EV_KEY
25
26 int
main(void)27 main(void )
28 {
29 struct termios tty;
30 uint64_t data;
31
32 if (ioctl(-1, TCGETS, &tty) != -1 ||
33 ioctl(-1, MMTIMER_GETRES, &data) != -1 ||
34 ioctl(-1, HIDIOCGVERSION, &data) != -1 ||
35 ioctl(-1, HIDIOCGPHYS(8), &data) != -1 ||
36 ioctl(-1, EVIOCGBIT(EV_KEY, 8), &data) != -1 ||
37 ioctl(-1, _IOR(0xde, 0xad, data), &data) != -1)
38 return 77;
39
40 return 0;
41 }
42
43 #else
44
45 int
main(void)46 main(void )
47 {
48 return 77;
49 }
50
51 #endif
52