ldap: fix MinGW compiler warning #1664
Conversation
ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with the latest original MinGW, resulting in compiler warnings since commit f0fe66f. Fix this for the non-SSPI case by using ldap_simple_bind_s again instead of ldap_bind_s with LDAP_AUTH_SIMPLE.
@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @captain-caveman2k, @bagder and @gknauf to be potential reviewers. |
@MarcelRaad It is not deprecated in Windows SDK https://msdn.microsoft.com/en-us/library/aa366156(v=vs.85).aspx. So if you try to solve MinGW problem, could you please use #if defined(MINGW)... or something? |
@snikulov Thanks for the comment! Yes, I have that problem only with MinGW (or, to be exact, with w32api, which is MinGW's version of the Windows SDK). But I don't understand what an (FWIW, |
Both functions are documented for Vista+ but some searching just now shows them being used on earlier versions. Is one known to be more available than the other? |
@MarcelRaad @jay Changes looks good to me. ldap_simple_bind_s <=> ldap_bind_s + LDAP_AUTH_SIMPLE. |
LGTM |
Thanks for the review! |
ldap_bind_s
is marked as deprecated in w32api's winldap.h shipping withthe latest original MinGW, resulting in compiler warnings since commit
f0fe66f. Fix this for the non-SSPI
case by using
ldap_simple_bind_s
again instead ofldap_bind_s
withLDAP_AUTH_SIMPLE
.