diff --git a/src/tools/fsync/test_fsync.c b/src/tools/fsync/test_fsync.c
index cbeed45a650b4b13094b8b33c723a6c26f5fce1f..3905d2b15753b8088f7aa6401d3938f9e1bc0769 100644
--- a/src/tools/fsync/test_fsync.c
+++ b/src/tools/fsync/test_fsync.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
+#include <sys/time.h>
 #include <unistd.h>
 
 /* O_SYNC and O_FSYNC are the same */