diff --git a/hid.c b/hid.c
index 2830b58..a652222 100644
--- a/hid.c
+++ b/hid.c
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <stdio.h>
+#include <sys/time.h>
 #include <string.h>
 
 #define SYSFS_HIDRAW_CLASS_PATH "/sys/class/hidraw"
