Blame SOURCES/0054-xlat-provide-fallback-definitions-for-netlink_ack_fl.patch

86f512
From a0306ed4ca69434ed67e7717460a83a027d3dec8 Mon Sep 17 00:00:00 2001
86f512
From: Eugene Syromyatnikov <evgsyr@gmail.com>
86f512
Date: Wed, 9 Oct 2019 20:12:41 +0200
86f512
Subject: [PATCH 54/76] xlat: provide fallback definitions for
86f512
 netlink_ack_flags constants
86f512
86f512
* xlat/netlink_ack_flags.in: Add fallback definitions.
86f512
86f512
References: https://bugzilla.redhat.com/show_bug.cgi?id=1758201
86f512
---
86f512
 xlat/netlink_ack_flags.in | 4 ++--
86f512
 1 file changed, 2 insertions(+), 2 deletions(-)
86f512
86f512
Index: strace-5.1/xlat/netlink_ack_flags.in
86f512
===================================================================
86f512
--- strace-5.1.orig/xlat/netlink_ack_flags.in	2017-07-19 11:25:58.000000000 +0200
86f512
+++ strace-5.1/xlat/netlink_ack_flags.in	2020-01-29 12:15:46.027048646 +0100
86f512
@@ -1,2 +1,2 @@
86f512
-NLM_F_CAPPED
86f512
-NLM_F_ACK_TLVS
86f512
+NLM_F_CAPPED	0x100
86f512
+NLM_F_ACK_TLVS	0x200
86f512
Index: strace-5.1/xlat/netlink_ack_flags.h
86f512
===================================================================
86f512
--- strace-5.1.orig/xlat/netlink_ack_flags.h	2019-05-22 15:08:30.000000000 +0200
86f512
+++ strace-5.1/xlat/netlink_ack_flags.h	2020-01-29 12:16:05.491944228 +0100
86f512
@@ -3,6 +3,20 @@
86f512
 #include "gcc_compat.h"
86f512
 #include "static_assert.h"
86f512
 
86f512
+#if defined(NLM_F_CAPPED) || (defined(HAVE_DECL_NLM_F_CAPPED) && HAVE_DECL_NLM_F_CAPPED)
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((NLM_F_CAPPED) == (0x100), "NLM_F_CAPPED != 0x100");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define NLM_F_CAPPED 0x100
86f512
+#endif
86f512
+#if defined(NLM_F_ACK_TLVS) || (defined(HAVE_DECL_NLM_F_ACK_TLVS) && HAVE_DECL_NLM_F_ACK_TLVS)
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((NLM_F_ACK_TLVS) == (0x200), "NLM_F_ACK_TLVS != 0x200");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define NLM_F_ACK_TLVS 0x200
86f512
+#endif
86f512
 
86f512
 #ifndef XLAT_MACROS_ONLY
86f512
 
86f512
@@ -14,12 +28,8 @@
86f512
 
86f512
 static
86f512
 const struct xlat netlink_ack_flags[] = {
86f512
-#if defined(NLM_F_CAPPED) || (defined(HAVE_DECL_NLM_F_CAPPED) && HAVE_DECL_NLM_F_CAPPED)
86f512
-  XLAT(NLM_F_CAPPED),
86f512
-#endif
86f512
-#if defined(NLM_F_ACK_TLVS) || (defined(HAVE_DECL_NLM_F_ACK_TLVS) && HAVE_DECL_NLM_F_ACK_TLVS)
86f512
-  XLAT(NLM_F_ACK_TLVS),
86f512
-#endif
86f512
+ XLAT(NLM_F_CAPPED),
86f512
+ XLAT(NLM_F_ACK_TLVS),
86f512
  XLAT_END
86f512
 };
86f512