]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: add include guards to ldap_backend.cc (#2021)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Sat, 15 Mar 2025 05:00:49 +0000 (05:00 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 15 Mar 2025 05:00:52 +0000 (05:00 +0000)
In the non-Windows case, we unconditinoally
include some system headers. Add conditions
for improved portability

Fixes error:
```
src/auth/digest/LDAP/ldap_backend.cc:49:10:
   fatal error: lber.h: No such file or directory
```

src/auth/digest/LDAP/ldap_backend.cc

index 2db3e8a806c48f883bc98f4c9461261255c0ef14..77b41477bbbe37f1f25f7340deefdb37d674277d 100644 (file)
@@ -46,8 +46,12 @@ PFldap_start_tls_s Win32_ldap_start_tls_s;
 
 #else
 
+#if HAVE_LBER_H
 #include <lber.h>
+#endif
+#if HAVE_LDAP_H
 #include <ldap.h>
+#endif
 
 #endif
 #define PROGRAM_NAME "digest_pw_auth(LDAP_backend)"