On 24 Mar 2025, at 17:20, Eric Covener <cove...@gmail.com> wrote:

> Changed bits are fine on zOS (stub still not loading).
> 
> The use of LDAP_OPT_OFF/ON here is still a warning:
>>       void *refs = invalue->refs ? LDAP_OPT_ON : LDAP_OPT_OFF;
> 
> Due to:
> 
> $ grep LDAP_OPT_ON /usr/include/ldap.h
> #define LDAP_OPT_ON     0x01
> 
> WARNING CCN3196 ./ldap/apr_ldap.c:1081  Initialization between types
> "void*" and "int" is not allowed.
> 
> But I haven't gotten back to / paste the the dlsym issue in the stub
> so none of it has run.
> 
> In the older codebase, we only used LDAP_OPT_ON in SDK-specific code I
> think so there was no autoconf check.

Reading the docs at 
https://www.ibm.com/docs/en/zos/3.1.0?topic=routines-ldap-set-option-ldap-set-option-np
 it looks like this patch should work:

Index: ldap/apr_ldap.c
===================================================================
--- ldap/apr_ldap.c     (revision 1924559)
+++ ldap/apr_ldap.c     (working copy)
@@ -1055,7 +1055,7 @@
         break;
 
     case APR_LDAP_OPT_REFERRALS: {
-        void *refs = invalue->refs ? LDAP_OPT_ON : LDAP_OPT_OFF;
+        void *refs = invalue->refs ? (void *)LDAP_OPT_ON : (void 
*)LDAP_OPT_OFF;
 
         /* Setting this option is supported on at least TIVOLI_SDK and 
OpenLDAP.
          */


Seems the params are either zero or NULL, alternatively not-zero or not-NULL. 
As a result the cast gives this effect on all toolkits.

Regards,
Graham
--

Reply via email to