summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-04-22 07:42:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-04-25 13:41:15 +0200
commit02311766135700f8dd8528cc7cacda636c8f304d (patch)
treefdacbd13968628244f0fe61369c56d1b5488c379 /vbahelper
parentcd2272874d1b1911dec6c6e7bf3d67861be4a015 (diff)
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 <https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626> "[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>
Diffstat (limited to 'vbahelper')
0 files changed, 0 insertions, 0 deletions