]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
MinGW: Fix winldap.h detection (#2010)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Sun, 2 Mar 2025 21:24:42 +0000 (21:24 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 4 Mar 2025 13:07:58 +0000 (13:07 +0000)
<winldap.h> requires <windows.h> to be previously
included in order to compile.

    configure:38466: checking for winldap.h
    wincrypt.h:5051:254: error: 'PSYSTEMTIME' has not been declared

configure.ac

index cc6393b79036e94146ce5aa55aa8786d59bf2361..650d0b978307e1f48d9945415459ad609b9db70d 100644 (file)
@@ -1185,7 +1185,11 @@ SQUID_CHECK_LIB_WORKS(ldap,[
     dnl On MinGW OpenLDAP is not available, try Windows LDAP libraries
     dnl TODO: use AC_CHECK_LIB
     LIBLDAP_LIBS="-lwldap32"
-    AC_CHECK_HEADERS(winldap.h)
+    AC_CHECK_HEADERS([windows.h winldap.h],,,[
+      #if HAVE_WINDOWS_H
+      #include <windows.h>
+      #endif
+    ])
   ])
   AC_CHECK_HEADERS(ldap.h lber.h)
   AC_CHECK_HEADERS(mozldap/ldap.h)