diff mbox series

[oe,meta-networking,4/4] ypbind-mt: Fix build with glibc 2.30

Message ID 20190727185937.29832-4-raj.khem@gmail.com
State New
Headers show
Series [oe,meta-networking,1/4] postfix: Fix build failures with glibc 2.30 | expand

Commit Message

Khem Raj July 27, 2019, 6:59 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...-configure-time-check-for-gettid-API.patch | 45 +++++++++++++++++++
 .../recipes-support/nis/ypbind-mt_2.6.bb      |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch

-- 
2.22.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch b/meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch
new file mode 100644
index 0000000000..9484d0b007
--- /dev/null
+++ b/meta-networking/recipes-support/nis/ypbind-mt/0001-Add-configure-time-check-for-gettid-API.patch
@@ -0,0 +1,45 @@ 
+From 25d5daf30aa2dc451ba528712f668036d8506054 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 07:50:26 -0700
+Subject: [PATCH] Add configure time check for gettid API
+
+glibc 2.30 has added this syscalls wrapper
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac  | 1 +
+ src/log_msg.c | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9e32a4a..6d1067b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,7 @@ if test -n "$TIRPC_LIBS"; then
+   AC_DEFINE(HAVE_TIRPC, 1, [Define to 1 if TIRPC is available])
+ fi
+ 
++AC_CHECK_FUNCS(gettid)
+ dnl The difficult part: could we reconfigure NSS or must we use DNS ?
+ AC_CHECK_FUNCS(__nss_configure_lookup)
+ if eval "test \"`echo '$ac_cv_func___nss_configure_lookup'`\" != yes"; then
+diff --git a/src/log_msg.c b/src/log_msg.c
+index 49f0905..37da311 100644
+--- a/src/log_msg.c
++++ b/src/log_msg.c
+@@ -26,6 +26,7 @@
+ #include "log_msg.h"
+ 
+ #include <sys/syscall.h>
++#if !HAVE_GETTID
+ #ifdef __NR_gettid
+ static pid_t
+ gettid (void)
+@@ -39,6 +40,7 @@ gettid (void)
+     return getpid ();
+ }
+ #endif
++#endif
+ 
+ int debug_flag = 0;
+ int logfile_flag = 0;
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb b/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb
index 1a64e6c2e1..4f7f8aa3ef 100644
--- a/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb
+++ b/meta-networking/recipes-support/nis/ypbind-mt_2.6.bb
@@ -32,6 +32,7 @@  SRC_URI = "https://github.com/thkukuk/ypbind-mt/releases/download/v${PV}/${BPN}-
            file://ypbind.init \
            file://ypbind.service \
            file://0001-dns_hosts-Fix-build-with-musl.patch \
+           file://0001-Add-configure-time-check-for-gettid-API.patch \
            "
 SRC_URI[md5sum] = "7cf89641fdc128d0919207e4b7caaf1d"
 SRC_URI[sha256sum] = "0696c0263c4fd48a4ff2ce6c109f05f37aab0f71646d81cb22c7c28591bf80eb"