Use uint16_t instead of __u16 and int32_t instead of __s32.
include unistd.h for getopt()
diff --git a/sendevent.c b/sendevent.c
index 1608e6c..fc7b800 100644
--- a/sendevent.c
+++ b/sendevent.c
@@ -6,15 +6,16 @@
 #include <sys/ioctl.h>
 //#include <linux/input.h> // this does not compile
 #include <errno.h>
+#include <unistd.h>
 
 
 // from <linux/input.h>
 
 struct input_event {
 	struct timeval time;
-	__u16 type;
-	__u16 code;
-	__s32 value;
+	uint16_t type;
+	uint16_t code;
+	int32_t value;
 };
 
 #define EVIOCGVERSION		_IOR('E', 0x01, int)			/* get driver version */