diff mbox series

[oe,meta-networking,2/4] snort: Fix build with glibc 2.30

Message ID 20190727185937.29832-2-raj.khem@gmail.com
State Accepted
Commit d31ac50253c6500710c07dcae83e843a091e6867
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>

---
 ...deck-for-gettid-API-during-configure.patch | 48 +++++++++++++++++++
 .../snort/snort_2.9.14.bb                     |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.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-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.patch b/meta-networking/recipes-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.patch
new file mode 100644
index 0000000000..eff610de7c
--- /dev/null
+++ b/meta-networking/recipes-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.patch
@@ -0,0 +1,48 @@ 
+From c45ab69f9428e4d2fc1146301a4546bb2b42c9ae Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 00:25:58 -0700
+Subject: [PATCH] chdeck for gettid API during configure
+
+glibc 2.30 added gettid syscall wrapper
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.in | 2 +-
+ src/util.h   | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 000bb91..d79e6d0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -256,7 +256,7 @@ SN_CHECK_DECLS(printf fprintf syslog puts fputs fputc fopen  \
+            strcasecmp strncasecmp strerror perror socket sendto   \
+            vsnprintf snprintf strtoul)
+ 
+-AC_CHECK_FUNCS([sigaction strlcpy strlcat strerror vswprintf wprintf memrchr inet_ntop])
++AC_CHECK_FUNCS([sigaction strlcpy strlcat strerror vswprintf wprintf memrchr inet_ntop gettid])
+ 
+ AC_CHECK_FUNC([snprintf],[have_snprintf="yes"],[have_snprintf="no"])
+ AM_CONDITIONAL(BUILD_SNPRINTF, test "x$have_snprintf" != "xyes")
+diff --git a/src/util.h b/src/util.h
+index 6880906..c310b83 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -374,6 +374,7 @@ static inline int IsEmptyStr(const char *str)
+     return 0;
+ }
+ 
++#if !HAVE_GETTID
+ static inline pid_t gettid(void)
+ {
+ #if defined(LINUX) && defined(SYS_gettid)
+@@ -382,5 +383,6 @@ static inline pid_t gettid(void)
+     return getpid();
+ #endif
+ }
++#endif
+ 
+ #endif /*__UTIL_H__*/
+-- 
+2.22.0
+
diff --git a/meta-networking/recipes-connectivity/snort/snort_2.9.14.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.14.bb
index b11890c490..6ead49bb61 100644
--- a/meta-networking/recipes-connectivity/snort/snort_2.9.14.bb
+++ b/meta-networking/recipes-connectivity/snort/snort_2.9.14.bb
@@ -12,6 +12,7 @@  SRC_URI = "https://www.snort.org/downloads/archive/snort/${BP}.tar.gz \
     file://fix-host-contamination-when-enable-static-daq.patch \
     file://disable-run-test-program-while-cross-compiling.patch \
     file://configure.in-disable-tirpc-checking-for-fedora.patch \
+    file://0001-chdeck-for-gettid-API-during-configure.patch \
 "
 
 SRC_URI[md5sum] = "d1689c7ccaaa7bfcfa83b5bff6b8f9b8"