From 39f9ff852f95f15c76c53cbfc8958b300294a8e2 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 3 Dec 2024 19:05:44 +0100 Subject: [PATCH] Assume that callbacks are not broken in OpenLDAP when cross-compiling If we do cross-compiling against a known broken version of OpenLDAP, we can do `export ac_cv_member_struct_ldap_conncb_lc_arg=no` before running configure. This is rather unlikely now, as the test was done to detect a bug that was fixed 16 years ago. This allows the project to be configured successfully when cross-compiling, without disabling connection callbacks. Reviewed-by: Sumit Bose --- src/external/ldap.m4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/external/ldap.m4 b/src/external/ldap.m4 index f42023cd44e..0e9d295393d 100644 --- a/src/external/ldap.m4 +++ b/src/external/ldap.m4 @@ -78,9 +78,10 @@ AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg], return ldap_set_option(NULL, LDAP_OPT_CONNECT_CB, &cb); ]] )], [AC_DEFINE([HAVE_LDAP_CONNCB], [1], - [Define if LDAP connection callbacks are available])], + [Define if LDAP connection callbacks are available, always set when cross-compiling])], [AC_MSG_WARN([Found broken callback implementation])], - [])], + [AC_DEFINE([HAVE_LDAP_CONNCB], [1], + [Define if LDAP connection callbacks are available, always set when cross-compiling])])], [], [[#include ]]) AC_CHECK_TYPE([LDAPDerefRes],