This is strange typically modern mistake. Learn please: stat(2) used sys/types.h and not reverse
diff --git a/include/libbb.h b/include/libbb.h
index e767948..760019d 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -27,8 +27,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <termios.h>
 #include <stdint.h>