diff options
author | Todd C. Miller <Todd.Miller@sudo.ws> | 2023-04-26 11:10:46 -0600 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@sudo.ws> | 2023-04-26 11:10:46 -0600 |
commit | 565801b83539f08d74b73da74cbd22f41331cce8 (patch) | |
tree | cb1f24b658cab072611742038e1c879bd8e10c19 | |
parent | 7e14385852b8d7f34900305d11b0348c524baa42 (diff) | |
download | sudo-565801b83539f08d74b73da74cbd22f41331cce8.tar.gz |
Use ldap_msgfree() instead of ldap_init() for the lber.h test.
The ldap_init() function is marked as deprecated and not defined
by default on some systems. This can cause an error for compilers
that do not support implicit function declarations.
From Florian Weimer.
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | m4/ldap.m4 | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -31515,7 +31515,7 @@ else case e in #( int main (void) { -(void)ldap_init(0, 0) +return ldap_msgfree(NULL) ; return 0; } diff --git a/m4/ldap.m4 b/m4/ldap.m4 index 68aca3922..39f2e352e 100644 --- a/m4/ldap.m4 +++ b/m4/ldap.m4 @@ -52,7 +52,7 @@ AC_DEFUN([SUDO_CHECK_LDAP], [ #include <lber.h>]) AC_CACHE_CHECK([whether lber.h is needed when including ldap.h], [sudo_cv_header_lber_h], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> -#include <ldap.h>]], [[(void)ldap_init(0, 0)]])], [ +#include <ldap.h>]], [[return ldap_msgfree(NULL)]])], [ # No need to explicitly include lber.h when including ldap.h. sudo_cv_header_lber_h=no ], [ |