https://bugs.winehq.org/show_bug.cgi?id=51129
--- Comment #3 from Sergio Durigan Junior sergio.durigan@canonical.com --- (In reply to Hans Leidekker from comment #2)
(In reply to Sergio Durigan Junior from comment #0)
Wine installs the "/usr/include/wine/wine/windows/winldap.h" file, which exports the ldap_connect function:
ULONG CDECL ldap_connect(LDAP*,struct l_timeval*);
With the recent OpenLDAP 2.5 release, we now have an "ldap_connection" function being exported by it as well (with a different prototype):
https://git.openldap.org/openldap/openldap/-/blame/OPENLDAP_REL_ENG_2_5_4/ include/ldap.h#L1553
This will need to be fixed in order to prevent linking problems with OpenLDAP.
What linking problem do you see?
OK, let me backtrack a bit. I'm not familiar with Wine, so apologies for any misunderstandings here.
I gave it a try and it seems that the "winldap.h" file is supposed to contain the Windows-specific definitions of OpenLDAP's "ldap.h", am I right? I gave it a try here, and I try to include both "winldap.h" and "ldap.h" I get a bunch of errors due to conflicting definitions:
$ gcc -l:wldap32.dll.so test.c -I/usr/include/wine/wine/windows/ -L/usr/lib/x86_64-linux-gnu/wine/ -lldap In file included from /usr/include/ldap.h:30, from test.c:3: /usr/include/lber.h:212:16: error: redefinition of ‘struct berval’ 212 | typedef struct berval { | ^~~~~~ In file included from test.c:2: /usr/include/wine/wine/windows/winldap.h:276:16: note: originally defined here 276 | typedef struct berval | ^~~~~~ In file included from /usr/include/ldap.h:30, from test.c:3: /usr/include/lber.h:215:3: error: conflicting types for ‘BerValue’ 215 | } BerValue; | ^~~~~~~~ .... and on it goes
In this case, and IIUC, "winldap.h" is not supposed to be used along with "ldap.h". I don't know if Wine offers its own version of libldap for Windows, but it seems to be the case given the "winldap32.dll.so" shlib. Is this a correct assumption? If it is, then this bug should probably be closed as invalid (and I apologize for the noise).
Thanks.