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