Skip to content

Commit

Permalink
Assume that callbacks are not broken in OpenLDAP when cross-compiling
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
krnowak committed Dec 11, 2024
1 parent 132d208 commit 3c66b0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/external/ldap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ldap.h>]])

AC_CHECK_TYPE([LDAPDerefRes],
Expand Down

0 comments on commit 3c66b0b

Please sign in to comment.