summaryrefslogtreecommitdiff
path: root/external/openldap
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-08-03 17:18:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-08-04 12:02:20 +0200
commit49a5c32d6e29c6551531763bde126bdcc36ec93e (patch)
tree30b8eeeb60f1d7877b7e80f444eda5e08aa1fe8a /external/openldap
parent4f37c51e9de14a04365c35f7ec7a4ac256995a51 (diff)
external/openldap: Fix -Wint-conversion
...with recent Clang 16 trunk since <https://github.com/llvm/llvm-project/commit/7068aa98412ade19a34b7ed126f4669f581b2311> "Strengthen -Wint-conversion to default to an error", causing > checking for pthread_detach with <pthread.h>... no > configure: error: could not locate pthread_detach() because of > configure:19227: checking for pthread_detach with <pthread.h> > configure:19249: ~/llvm/inst/bin/clang -o conftest -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -D_BSD_SOURCE -O0 -fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor -ggnu-pubnames -Iworkdir/UnpackedTarball/nss/dist/public/nss -Iworkdir/UnpackedTarball/nss/dist/out/include -Iworkdir/UnpackedTarball/nss/dist/public/nss -Iworkdir/UnpackedTarball/nss/dist/out/include -fuse-ld=lld --ld-path=~/llvm/inst/bin/ld.lld -Wl,--gdb-index -Lworkdir/UnpackedTarball/nss/dist/out/lib -pthread conftest.c >&5 > conftest.c:109:16: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'pthread_t' (aka 'unsigned long') [-Wint-conversion] > pthread_detach(NULL); > ^~~~ > ~/llvm/inst/lib/clang/16.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL' > # define NULL ((void*)0) > ^~~~~~~~~~ > /usr/include/pthread.h:269:38: note: passing argument to parameter '__th' here > extern int pthread_detach (pthread_t __th) __THROW; > ^ > 1 error generated. > configure:19249: $? = 1 Change-Id: I3f2b8836e7aba6536e2877b492b43de588804f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137758 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/openldap')
-rw-r--r--external/openldap/UnpackedTarball_openldap.mk1
-rw-r--r--external/openldap/Wint-conversion.patch11
2 files changed, 12 insertions, 0 deletions
diff --git a/external/openldap/UnpackedTarball_openldap.mk b/external/openldap/UnpackedTarball_openldap.mk
index 999a1eddad0b..98c88a28ccc5 100644
--- a/external/openldap/UnpackedTarball_openldap.mk
+++ b/external/openldap/UnpackedTarball_openldap.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,openldap,\
$(eval $(call gb_UnpackedTarball_add_patches,openldap,\
external/openldap/openldap-2.4.44.patch.1 \
external/openldap/configure-c99.patch \
+ external/openldap/Wint-conversion.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/openldap/Wint-conversion.patch b/external/openldap/Wint-conversion.patch
new file mode 100644
index 000000000000..60e14c991cc0
--- /dev/null
+++ b/external/openldap/Wint-conversion.patch
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -19241,7 +19241,7 @@
+ int
+ main ()
+ {
+-pthread_detach(NULL);
++pthread_t t; pthread_detach(t);
+ ;
+ return 0;
+ }