On NetBSD, time.h includes sys/time.h that includes sys/select.h. It must be included before winsock2.h that redefines fd_set.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46230 Signed-off-by: Frédéric Fauberteau triaxx@NetBSD.org --- dlls/wininet/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 4122067e41..131d3ac612 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -35,12 +35,13 @@ # include <zlib.h> #endif
+#include <time.h> + #include "winsock2.h" #include "ws2ipdef.h"
#include <stdarg.h> #include <stdio.h> -#include <time.h> #include <assert.h>
#include "windef.h"
Frédéric Fauberteau triaxx@NetBSD.org writes:
On NetBSD, time.h includes sys/time.h that includes sys/select.h. It must be included before winsock2.h that redefines fd_set.
winsock2.h is supposed to be included before everything else so that it can properly redefine the types.
Le 2018-12-04 14:52, Alexandre Julliard a écrit :
Frédéric Fauberteau triaxx@NetBSD.org writes:
On NetBSD, time.h includes sys/time.h that includes sys/select.h. It must be included before winsock2.h that redefines fd_set.
winsock2.h is supposed to be included before everything else so that it can properly redefine the types.
From the following error message, I investigated to identify the source of the problem: In file included from ../../include/winsock2.h:47:0, from http.c:38: ../../include/winsock.h:58:22: error: unknown type name 'Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library' # define fd_set Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library ^ The patch fixes it but my understanding is probably limited and I have no better idea to solve this building error.