diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 7049ab13969f1012e5ac198f676755e97b575231..9d70db96ea83852d4365cf9f0096454bc2e41cec 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -38,7 +38,6 @@
 typedef FILE LLFILE;
 
 #include <fstream>
-#include <bits/postypes.h>
 #include <sys/stat.h>
 
 #if LL_WINDOWS
@@ -47,6 +46,7 @@ typedef struct _stat	llstat;
 #else
 typedef struct stat		llstat;
 #include <ext/stdio_filebuf.h>
+#include <bits/postypes.h>
 #endif
 
 #ifndef S_ISREG