sergiodj / bind-dyndb-ldap

Forked from bind-dyndb-ldap 2 years ago
Clone

859f339 Fix FTBFS when building with OpenLDAP 2.5

Authored and Committed by sergiodj 2 years ago
    Fix FTBFS when building with OpenLDAP 2.5
    
    The new version of OpenLDAP (2.5) exports the 'ldap_connect' symbol,
    which conflicts with the function with the same name that is being
    defined and used in src/ldap_helper.c:
    
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Werror -std=gnu99 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fvisibility=hidden -fno-delete-null-pointer-checks -c ../../src/ldap_entry.c  -fPIC -DPIC -o .libs/ldap_la-ldap_entry.o
    ../../src/ldap_helper.c:343:21: error: conflicting types for ‘ldap_connect’
      343 | static isc_result_t ldap_connect(ldap_instance_t *ldap_inst,
          |                     ^~~~~~~~~~~~
    In file included from ../../src/ldap_helper.c:52:
    /usr/include/ldap.h:1554:1: note: previous declaration of ‘ldap_connect’ was here
     1554 | ldap_connect( LDAP *ld );
          | ^~~~~~~~~~~~
    
    This commit fixes this FTBFS by renaming the 'ldap_connect' function
    to 'bdl_ldap_connect'.  While at it, it also renames the
    'ldap_reconnect' function to 'bdl_ldap_reconnect'.
    
    Signed-off-by: Sergio Durigan Junior <sergiodj@sergiodj.net>
    
        
file modified
+12 -12