[OpenSIPS-Devel] [OpenSIPS/opensips] 3926e4: Rename an ldap_connect() to opensips_ldap_connect()

Bogdan Andrei IANCU noreply at github.com
Fri Apr 8 07:38:49 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 3926e4201407b0814dff1ba8c85d66c995360e36
      https://github.com/OpenSIPS/opensips/commit/3926e4201407b0814dff1ba8c85d66c995360e36
  Author: Petr Písař <ppisar at redhat.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    M modules/ldap/ldap_api_fn.c
    M modules/ldap/ldap_connect.c
    M modules/ldap/ldap_connect.h
    M modules/ldap/ldap_mod.c

  Log Message:
  -----------
  Rename an ldap_connect() to opensips_ldap_connect()

The name clashes with openldap-2.6.1's ldap_connect() and a compiler errors
on the mismatching protype:

gcc -fPIC -DPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fgnu89-inline -DMOD_NAME='ldap' -DPKG_MALLOC  -DSHM_MMAP  -DUSE_MCAST  -DDISABLE_NAGLE  -DSTATISTICS  -DHAVE_RESOLV_RES  -DF_MALLOC  -DQ_MALLOC  -DHP_MALLOC  -DDBG_MALLOC   -DNAME='"opensips"' -DVERSION='"3.1.7"' -DARCH='"aarch64"' -DOS='"linux"' -DCOMPILER='"gcc 12"' -D__CPU_aarch64 -D__OS_linux -D__SMP_yes -DCFG_DIR='"/etc/opensips/"'  -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DUSE_POSIX_SEM   -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -c ld_session.c -o ld_session.o
[...]
In file included from ld_session.c:33:
ldap_connect.h:46:12: error: conflicting types for 'ldap_connect'; have 'int(char *, struct ld_conn *)'
   46 | extern int ldap_connect(char* _ld_name, struct ld_conn* conn);
      |            ^~~~~~~~~~~~
In file included from ld_session.h:34,
                 from ld_session.c:32:
/usr/include/ldap.h:1555:1: note: previous declaration of 'ldap_connect' with type 'int(LDAP *)' {aka 'int(struct ldap *)'}
 1555 | ldap_connect( LDAP *ld );
      | ^~~~~~~~~~~~
make[1]: *** [../../Makefile.rules:26: ld_session.o] Error 1

Because it's an a function internal to the ldap module, this patch fixes it
with renaming the function.

Signed-off-by: Petr Písař <ppisar at redhat.com>


  Commit: 457111cebc2010225dffa668edd8155fdca6a62a
      https://github.com/OpenSIPS/opensips/commit/457111cebc2010225dffa668edd8155fdca6a62a
  Author: Bogdan Andrei IANCU <bogdan at opensips.org>
  Date:   2022-04-08 (Fri, 08 Apr 2022)

  Changed paths:
    M modules/ldap/ldap_api_fn.c
    M modules/ldap/ldap_connect.c
    M modules/ldap/ldap_connect.h
    M modules/ldap/ldap_mod.c

  Log Message:
  -----------
  Merge pull request #2779 from ppisar/openldap-2.6.1

Rename an ldap_connect() to opensips_ldap_connect()


Compare: https://github.com/OpenSIPS/opensips/compare/432a53305ba4...457111cebc20



More information about the Devel mailing list