external/openldap/UnpackedTarball_openldap.mk |    1 +
 external/openldap/Wint-conversion.patch       |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit 49a5c32d6e29c6551531763bde126bdcc36ec93e
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Wed Aug 3 17:18:38 2022 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Aug 4 12:02:20 2022 +0200

    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 <[email protected]>

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;
+ }

Reply via email to