summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-10-07 13:19:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-08 08:08:32 +0100
commit244d3a8464fb7ae2dba598c96186171a67455f70 (patch)
treebb2b00b99507f476cf3c070cfb51fdd712d89a79 /meta/recipes-devtools/strace
parentf7819da364600f20ccd64cc36ec83fd21c5a5437 (diff)
downloadpoky-244d3a8464fb7ae2dba598c96186171a67455f70.tar.gz
strace: Fix value of IPPROTO_MAX
This should also fix build with musl ../strace-5.8/xlat/inet_protocols.h:239:1: error: static assertion failed: "IPPROTO_MAX != 256" 239 | static_assert((IPPROTO_MAX) == (256), "IPPROTO_MAX != 256"); | ^~~~~~~~~~~~~ (From OE-Core rev: 8b0438b5d4850aaca0f725f9ad5d040b90b1347b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/strace')
-rw-r--r--meta/recipes-devtools/strace/strace/0001-xlat-Mark-IPPROTO_MAX-last-in-IPPROTO_-constants.patch70
-rw-r--r--meta/recipes-devtools/strace/strace_5.8.bb1
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace/0001-xlat-Mark-IPPROTO_MAX-last-in-IPPROTO_-constants.patch b/meta/recipes-devtools/strace/strace/0001-xlat-Mark-IPPROTO_MAX-last-in-IPPROTO_-constants.patch
new file mode 100644
index 0000000000..cd53f33f60
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-xlat-Mark-IPPROTO_MAX-last-in-IPPROTO_-constants.patch
@@ -0,0 +1,70 @@
1From 387d3b6fba95cb47c4dacc6bcd330148a9168850 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Oct 2020 12:54:03 -0700
4Subject: [PATCH] xlat: Mark IPPROTO_MAX last in IPPROTO_* constants
5
6* xlat/inet_protocols.in (IPPROTO_MAX): It should be the last entry
7 after adding IPPROTO_MPTCP this should have new value as
8 IPPROTO_MPTCP + 1.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Upstream-Status: Submitted [https://lists.strace.io/pipermail/strace-devel/2020-October/010253.html]
12---
13 xlat/inet_protocols.in | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16--- a/xlat/inet_protocols.in
17+++ b/xlat/inet_protocols.in
18@@ -32,5 +32,5 @@ IPPROTO_UDPLITE 136
19 IPPROTO_MPLS 137
20 IPPROTO_ETHERNET 143
21 IPPROTO_RAW 255
22-IPPROTO_MAX 256
23 IPPROTO_MPTCP 262
24+IPPROTO_MAX 263
25--- a/xlat/inet_protocols.h
26+++ b/xlat/inet_protocols.h
27@@ -234,19 +234,19 @@ DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
28 #else
29 # define IPPROTO_RAW 255
30 #endif
31-#if defined(IPPROTO_MAX) || (defined(HAVE_DECL_IPPROTO_MAX) && HAVE_DECL_IPPROTO_MAX)
32+#if defined(IPPROTO_MPTCP) || (defined(HAVE_DECL_IPPROTO_MPTCP) && HAVE_DECL_IPPROTO_MPTCP)
33 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
34-static_assert((IPPROTO_MAX) == (256), "IPPROTO_MAX != 256");
35+static_assert((IPPROTO_MPTCP) == (262), "IPPROTO_MPTCP != 262");
36 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
37 #else
38-# define IPPROTO_MAX 256
39+# define IPPROTO_MPTCP 262
40 #endif
41-#if defined(IPPROTO_MPTCP) || (defined(HAVE_DECL_IPPROTO_MPTCP) && HAVE_DECL_IPPROTO_MPTCP)
42+#if defined(IPPROTO_MAX) || (defined(HAVE_DECL_IPPROTO_MAX) && HAVE_DECL_IPPROTO_MAX)
43 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
44-static_assert((IPPROTO_MPTCP) == (262), "IPPROTO_MPTCP != 262");
45+static_assert((IPPROTO_MAX) == (263), "IPPROTO_MAX != 263");
46 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
47 #else
48-# define IPPROTO_MPTCP 262
49+# define IPPROTO_MAX 263
50 #endif
51
52 #ifndef XLAT_MACROS_ONLY
53@@ -353,12 +353,12 @@ static const struct xlat_data inet_proto
54 XLAT(IPPROTO_RAW),
55 #define XLAT_VAL_32 ((unsigned) (IPPROTO_RAW))
56 #define XLAT_STR_32 STRINGIFY(IPPROTO_RAW)
57- XLAT(IPPROTO_MAX),
58- #define XLAT_VAL_33 ((unsigned) (IPPROTO_MAX))
59- #define XLAT_STR_33 STRINGIFY(IPPROTO_MAX)
60 XLAT(IPPROTO_MPTCP),
61- #define XLAT_VAL_34 ((unsigned) (IPPROTO_MPTCP))
62- #define XLAT_STR_34 STRINGIFY(IPPROTO_MPTCP)
63+ #define XLAT_VAL_33 ((unsigned) (IPPROTO_MPTCP))
64+ #define XLAT_STR_33 STRINGIFY(IPPROTO_MPTCP)
65+ XLAT(IPPROTO_MAX),
66+ #define XLAT_VAL_34 ((unsigned) (IPPROTO_MAX))
67+ #define XLAT_STR_34 STRINGIFY(IPPROTO_MAX)
68 };
69 const struct xlat inet_protocols[1] = { {
70 .data = inet_protocols_xdata,
diff --git a/meta/recipes-devtools/strace/strace_5.8.bb b/meta/recipes-devtools/strace/strace_5.8.bb
index 70d5940f60..0415588b97 100644
--- a/meta/recipes-devtools/strace/strace_5.8.bb
+++ b/meta/recipes-devtools/strace/strace_5.8.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
14 file://ptest-spacesave.patch \ 14 file://ptest-spacesave.patch \
15 file://uintptr_t.patch \ 15 file://uintptr_t.patch \
16 file://0001-strace-fix-reproducibilty-issues.patch \ 16 file://0001-strace-fix-reproducibilty-issues.patch \
17 file://0001-xlat-Mark-IPPROTO_MAX-last-in-IPPROTO_-constants.patch \
17 " 18 "
18SRC_URI[sha256sum] = "df4a669f7fff9cc302784085bd4b72fab216a426a3f72c892b28a537b71e7aa9" 19SRC_URI[sha256sum] = "df4a669f7fff9cc302784085bd4b72fab216a426a3f72c892b28a537b71e7aa9"
19 20