http://bugs.gentoo.org/333301
https://bugs.archlinux.org/task/27188

--- 1/ipstreams/wvunixdgsocket.cc
+++ 2/ipstreams/wvunixdgsocket.cc
@@ -1,5 +1,5 @@
 #include "wvunixdgsocket.h"
-#ifdef MACOS
+#if defined(MACOS) || defined(__GNUC__)
 #include <sys/types.h>
 #include <sys/stat.h>
 #endif
--- 1/streams/wvatomicfile.cc
+++ 2/streams/wvatomicfile.cc
@@ -11,7 +11,8 @@
 #include "wvfileutils.h"
 #include "wvstrutils.h"
 
-#ifdef MACOS
+#if defined(MACOS) || defined(__GNUC__)
+#include <sys/types.h>
 #include <sys/stat.h>
 #endif
 
