diff options
-rw-r--r-- | meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch | 67 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/opensaf/opensaf_5.19.03.bb | 1 |
2 files changed, 68 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch new file mode 100644 index 0000000000..2b03b1800a --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 91c7362834ccd88d1432b3e6c5c51748b72b10ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 27 Jul 2019 07:21:16 -0700 | ||
4 | Subject: [PATCH] Add configure time check for gettid API | ||
5 | |||
6 | glibc 2.30 has added syscalls wrapper for gettid | ||
7 | it should now be checked during configure if C library provides | ||
8 | this API then do not define local function | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | configure.ac | 4 ++++ | ||
13 | src/base/logtrace.cc | 3 +++ | ||
14 | src/osaf/config.h.in | 3 +++ | ||
15 | 3 files changed, 10 insertions(+) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 22ab936..90f3da4 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -480,6 +480,10 @@ fi | ||
22 | |||
23 | AC_SUBST([localstatedir]) | ||
24 | |||
25 | +############################################# | ||
26 | +# Checks for functions. | ||
27 | +############################################# | ||
28 | +AC_CHECK_FUNCS([ gettid ]) | ||
29 | |||
30 | ############################################# | ||
31 | # Checks for programs. | ||
32 | diff --git a/src/base/logtrace.cc b/src/base/logtrace.cc | ||
33 | index 8908c1f..fe87e8d 100644 | ||
34 | --- a/src/base/logtrace.cc | ||
35 | +++ b/src/base/logtrace.cc | ||
36 | @@ -31,6 +31,7 @@ | ||
37 | #include "base/logtrace_client.h" | ||
38 | #include "base/logtrace_buffer.h" | ||
39 | #include "base/ncsgl_defs.h" | ||
40 | +#include "osaf/config.h" | ||
41 | |||
42 | namespace global { | ||
43 | |||
44 | @@ -58,7 +59,9 @@ std::once_flag init_flag; | ||
45 | thread_local LogTraceBuffer gl_thread_buffer{gl_local_thread_trace, | ||
46 | global::thread_trace_buffer_size}; | ||
47 | |||
48 | +#ifndef HAVE_GETTID | ||
49 | static pid_t gettid() { return syscall(SYS_gettid); } | ||
50 | +#endif | ||
51 | |||
52 | /** | ||
53 | * USR2 signal handler to enable/disable trace (toggle) | ||
54 | diff --git a/src/osaf/config.h.in b/src/osaf/config.h.in | ||
55 | index d1f6d1a..0a3f27d 100644 | ||
56 | --- a/src/osaf/config.h.in | ||
57 | +++ b/src/osaf/config.h.in | ||
58 | @@ -18,6 +18,9 @@ | ||
59 | /* Define if experimental code is enabled */ | ||
60 | #undef HAVE_EXPERIMENTAL | ||
61 | |||
62 | +/* Define to 1 if you have the `gettid' function. */ | ||
63 | +#undef HAVE_GETTID | ||
64 | + | ||
65 | /* SAHPI_INTERFACE_VERSION == A01 */ | ||
66 | #undef HAVE_HPI_A01 | ||
67 | |||
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.19.03.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.19.03.bb index 0cccebdfcd..505c087f17 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf_5.19.03.bb +++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.19.03.bb | |||
@@ -24,6 +24,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ | |||
24 | file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \ | 24 | file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \ |
25 | file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \ | 25 | file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \ |
26 | file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \ | 26 | file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \ |
27 | file://0001-Add-configure-time-check-for-gettid-API.patch \ | ||
27 | " | 28 | " |
28 | SRC_URI[md5sum] = "4dd1497ccd82d275735853bf0db5c510" | 29 | SRC_URI[md5sum] = "4dd1497ccd82d275735853bf0db5c510" |
29 | SRC_URI[sha256sum] = "de42c8dd850990716ca494ca598165cc7a23b5b7f2bc21af5d71a3d971ddd595" | 30 | SRC_URI[sha256sum] = "de42c8dd850990716ca494ca598165cc7a23b5b7f2bc21af5d71a3d971ddd595" |