diff -ru lua-5.2.4-orig/src/liolib.c lua-5.2.4/src/liolib.c
--- src/liolib.c	2013-04-12 20:48:47.000000000 +0200
+++ src/liolib.c	2018-02-13 12:46:43.000000000 +0100
@@ -88,6 +88,8 @@
 
 #if defined(LUA_USE_POSIX)	/* { */
 
+#include <sys/types.h>
+
 #define l_fseek(f,o,w)		fseeko(f,o,w)
 #define l_ftell(f)		ftello(f)
 #define l_seeknum		off_t
