|
| 1 | +From a559550c8e2d162735ff8a43de6dc59af71cf3df Mon Sep 17 00:00:00 2001 |
| 2 | +From: Krzesimir Nowak < [email protected]> |
| 3 | +Date: Tue, 3 Dec 2024 19:05:44 +0100 |
| 4 | +Subject: [PATCH] Assume that callbacks are not broken in OpenLDAP when |
| 5 | + cross-compiling |
| 6 | + |
| 7 | +If we do cross-compiling against a known broken version of OpenLDAP, |
| 8 | +we can do `export ac_cv_member_struct_ldap_conncb_lc_arg=no` before |
| 9 | +running configure. This is rather unlikely now, as the test was done |
| 10 | +to detect a bug that was fixed 16 years ago. |
| 11 | + |
| 12 | +This allows the project to be configured successfully when |
| 13 | +cross-compiling, without disabling connection callbacks. |
| 14 | +--- |
| 15 | + src/external/ldap.m4 | 3 ++- |
| 16 | + 1 file changed, 2 insertions(+), 1 deletion(-) |
| 17 | + |
| 18 | +diff --git a/src/external/ldap.m4 b/src/external/ldap.m4 |
| 19 | +index f42023cd4..09e44fc7b 100644 |
| 20 | +--- a/src/external/ldap.m4 |
| 21 | ++++ b/src/external/ldap.m4 |
| 22 | +@@ -80,7 +80,8 @@ AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg], |
| 23 | + [AC_DEFINE([HAVE_LDAP_CONNCB], [1], |
| 24 | + [Define if LDAP connection callbacks are available])], |
| 25 | + [AC_MSG_WARN([Found broken callback implementation])], |
| 26 | +- [])], |
| 27 | ++ [AC_DEFINE([HAVE_LDAP_CONNCB], [1], |
| 28 | ++ [Define if LDAP connection callbacks are available])])], |
| 29 | + [], [[#include <ldap.h>]]) |
| 30 | + |
| 31 | + AC_CHECK_TYPE([LDAPDerefRes], |
| 32 | +-- |
| 33 | +2.34.1 |
| 34 | + |
0 commit comments