Skip to contentSkip to conversation

sedutils: Fix build with clang11

PATCH New Khem Raj 1 participant 1 message Aug 18, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 sedutils: Fix build with clang11

---
 ...edDump-Add-typedef-name-to-the-union.patch | 34 +++++++++++++++++++
 .../recipes-extended/sedutil/sedutil_git.bb   |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-extended/sedutil/files/0001-DtaAnnotatedDump-Add-typedef-name-to-the-union.patch
meta-oe/recipes-extended/sedutil/files/0001-DtaAnnotatedDump-Add-typedef-name-to-the-union.patch new file +34 -0
new file mode 100644
index 0000000000..4be3353c66
@@ -0,0 +1,34 @@
+From 9db49b94336f65453e06fb6a6bc4e6edf9403fea Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Aug 2020 17:22:09 -0700
+Subject: [PATCH] DtaAnnotatedDump: Add typedef name to the union
+
+This is found with clang
+error: anonymous non-C-compatible type given name for linkage purposes by
+typedef declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
+| typedef union
+|              ^
+|               CAtomHeader
+
+Upstream-Status: Submitted [https://github.com/Drive-Trust-Alliance/sedutil/pull/332]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Common/DtaAnnotatedDump.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Common/DtaAnnotatedDump.h b/Common/DtaAnnotatedDump.h
+index 2749365..734c8eb 100644
+--- a/Common/DtaAnnotatedDump.h
++++ b/Common/DtaAnnotatedDump.h
+@@ -20,7 +20,7 @@ along with sedutil.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ #pragma pack(push,1)
+ 
+-typedef union
++typedef union CAtomHeader_t
+ {
+     // four bytes in big endian (network) byte order
+     uint8_t     all[4];
+-- 
+2.28.0
+
meta-oe/recipes-extended/sedutil/sedutil_git.bb +1 -0
index 765618433b..1e7a393193 100644
@@ -12,6 +12,7 @@ PV = "${BASEPV}+git${SRCPV}"
 SRCREV = "358cc758948be788284d5faba46ccf4cc1813796"
 SRC_URI = "git://github.com/Drive-Trust-Alliance/sedutil.git \
 	file://0001-Fix-build-on-big-endian-architectures.patch \
+        file://0001-DtaAnnotatedDump-Add-typedef-name-to-the-union.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.28.0