diff --git a/src/apps/fisql/fisql.c b/src/apps/fisql/fisql.c
index ec8fded..fd76956 100644
--- a/src/apps/fisql/fisql.c
+++ b/src/apps/fisql/fisql.c
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <setjmp.h>
 #include <signal.h>
+#include <sys/stat.h>
 #ifdef HAVE_READLINE
 #include <readline/readline.h>
 #include <readline/history.h>
