office-gobmx/external/openldap
Stephan Bergmann 0231176613 external/openldap: Don't use pthread_get/setconcurrency without declarations
At least with glibc on Linux, those two functions are only declared in
<pthread.h> when _XOPEN_SOURCE is defined.  And with
<7d644e1215>
"[C11/C2x] Change the behavior of the implicit function declaration warning" in
Clang 15 trunk that now causes hard errors

> thr_posix.c:93:9: error: call to undeclared function 'pthread_setconcurrency'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>         return pthread_setconcurrency( n );
>                ^
> thr_posix.c:107:9: error: call to undeclared function 'pthread_getconcurrency'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>         return pthread_getconcurrency();
>                ^

(vs. just silently ignored warnings) when building ExternalProject_openldap.
(And the way the corresponding AC_CHECK_FUNCS in
workdir/UnpackedTarball/openldap/configure.in works, it always set
HAVE_PTHREAD_GET/SETCONCURRENCY because it effectively checks for availability
of the symbols in a library, not for declarations of the C functions in an
include file.)

But if we explicitly define _XOPEN_SOURCE, we now also need to explicitly define
_DEFAULT_SOURCE or _BSD_SOURCE (which is otherwise implicitly defined by default
in glibc's features.h if no other such macros are defined).

Change-Id: I148d50c82ee2efc2a54f2cf4f84dead3941a3568
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133312
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-25 13:41:15 +02:00
..
ExternalProject_openldap.mk external/openldap: Don't use pthread_get/setconcurrency without declarations 2022-04-25 13:41:15 +02:00
Makefile
Module_openldap.mk
openldap-2.4.44.patch.1
README
UnpackedTarball_openldap.mk

OpenLDAP provides an LDAP client library

http://www.openldap.org/