From 9cb965e75c207637a0d23c9aa191c077771db17e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 4 Sep 2022 09:53:19 -0700 Subject: openldap: Fix configure check for pthread_detach Signed-off-by: Khem Raj --- ...onfigure-Pass-pthread_t-to-pthread_detach.patch | 32 ++++++++++++++++++++++ .../recipes-support/openldap/openldap_2.5.12.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta-oe/recipes-support/openldap/openldap/0001-configure-Pass-pthread_t-to-pthread_detach.patch diff --git a/meta-oe/recipes-support/openldap/openldap/0001-configure-Pass-pthread_t-to-pthread_detach.patch b/meta-oe/recipes-support/openldap/openldap/0001-configure-Pass-pthread_t-to-pthread_detach.patch new file mode 100644 index 0000000000..6e73f8b382 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap/0001-configure-Pass-pthread_t-to-pthread_detach.patch @@ -0,0 +1,32 @@ +From 7577b120acda087bf3f5f613c2c72663b3864ad8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 4 Sep 2022 09:43:06 -0700 +Subject: [PATCH] configure: Pass pthread_t to pthread_detach + +This helps compilers when using C2X standard + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + configure.ac | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0978eeb..58d15f8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1467,10 +1467,7 @@ pthread_rwlock_t rwlock; + dnl save the flags + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +-#ifndef NULL +-#define NULL (void*)0 +-#endif +-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) ++]], [[pthread_detach((pthread_t)-1);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) + ]) + + if test $ol_cv_func_pthread_detach = no ; then +-- +2.37.3 + diff --git a/meta-oe/recipes-support/openldap/openldap_2.5.12.bb b/meta-oe/recipes-support/openldap/openldap_2.5.12.bb index c01db08e46..a8ea84d70f 100644 --- a/meta-oe/recipes-support/openldap/openldap_2.5.12.bb +++ b/meta-oe/recipes-support/openldap/openldap_2.5.12.bb @@ -22,6 +22,7 @@ SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/$ file://0001-build-top.mk-unset-STRIP_OPTS.patch \ file://0001-libraries-Makefile.in-ignore-the-mkdir-errors.patch \ file://0001-librewrite-include-ldap_pvt_thread.h-before-redefini.patch \ + file://0001-configure-Pass-pthread_t-to-pthread_detach.patch \ " SRC_URI[sha256sum] = "d5086cbfc49597fa7d0670a429a9054552d441b16ee8b2435412797ab0e37b96" -- cgit v1.2.3-54-g00ecf