wininet: Include <unistd.h> in case we need off_t for zlib.

Gerald Pfeifer gerald at pfeifer.com
Sun Feb 15 10:16:53 CST 2015


After commit 5436fef80722fe7896aed5e659c31fdade4ef5b3

  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   Fri Feb 13 12:12:29 2015 +0100

    wininet: Always use winsock sockets.

FreeBSD not longer builds due to the following change:

   #include "config.h"
  -#include "wine/port.h"
 
  -#if defined(__MINGW32__) || defined (_MSC_VER)
  -#include <ws2tcpip.h>
  +#ifdef HAVE_ZLIB
  +#  define Z_SOLO
  +#  include <zlib.h>
   #endif

zlib.h on FreeBSD 10.x uses off_t, but at this point this is not
defined yet.  Including unistd.h before including zlib.h addresses
this.

Gerald

---
 dlls/wininet/http.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 59c358c..d24b60d 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -31,6 +31,7 @@
 
 #ifdef HAVE_ZLIB
 #  define Z_SOLO
+#  include <unistd.h>
 #  include <zlib.h>
 #endif
 
-- 
2.3.0



More information about the wine-patches mailing list