]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8383 Look for socklen_t in <ws2tcpip.h> too
authorRyan Tandy <ryan@nardis.ca>
Sun, 1 Sep 2019 18:53:37 +0000 (11:53 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 16 Apr 2020 16:48:50 +0000 (16:48 +0000)
MinGW targets do not have the <sys/socket.h> header. The configure check
would conclude that there is no socklen_t type, resulting in portable.h
containing its own definition of socklen_t, which would later conflict
with the actual definition in <ws2tcpip.h>.

Add <ws2tcpip.h> to the configure check for socklen_t, so that the
defined type is correctly detected.

configure.in

index b9cf43515fc1cb3f6d884525dde92e60d857b5a8..37293e618797a957ebe6b5f7b9479e9165e1362b 100644 (file)
@@ -2259,6 +2259,9 @@ AC_CHECK_TYPES([ptrdiff_t])
 AC_CHECK_TYPE([socklen_t],,, [$ac_includes_default
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+#ifdef HAVE_WINSOCK2
+#include <ws2tcpip.h>
 #endif])
 
 dnl socklen_t-like type in accept(), default socklen_t or int: