From 2947a7dc764413f236db956b0d5af0a6f4169eee Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Thu, 10 Oct 2019 11:49:02 +0200 Subject: [PATCH 56/76] xlat: update MDB_FLAGS_* constants Also, provide fallback definitions for constants. * xlat/mdb_flags.in (MDB_FLAGS_OFFLOAD): Add fallback definition. (MDB_FLAGS_FAST_LEAVE): New constant, introduced by Linux commit v5.4-rc1~131^2~321. --- xlat/mdb_flags.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: strace-5.1/xlat/mdb_flags.in =================================================================== --- strace-5.1.orig/xlat/mdb_flags.in 2017-09-17 14:04:11.000000000 +0200 +++ strace-5.1/xlat/mdb_flags.in 2020-01-29 12:28:36.222845420 +0100 @@ -1 +1,2 @@ -MDB_FLAGS_OFFLOAD +MDB_FLAGS_OFFLOAD (1 << 0) +MDB_FLAGS_FAST_LEAVE (1 << 1) Index: strace-5.1/xlat/mdb_flags.h =================================================================== --- strace-5.1.orig/xlat/mdb_flags.h 2019-05-22 15:08:30.000000000 +0200 +++ strace-5.1/xlat/mdb_flags.h 2020-01-29 12:32:34.459433886 +0100 @@ -3,6 +3,20 @@ #include "gcc_compat.h" #include "static_assert.h" +#if defined(MDB_FLAGS_OFFLOAD) || (defined(HAVE_DECL_MDB_FLAGS_OFFLOAD) && HAVE_DECL_MDB_FLAGS_OFFLOAD) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((MDB_FLAGS_OFFLOAD) == ((1 << 0)), "MDB_FLAGS_OFFLOAD != (1 << 0)"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define MDB_FLAGS_OFFLOAD (1 << 0) +#endif +#if defined(MDB_FLAGS_FAST_LEAVE) || (defined(HAVE_DECL_MDB_FLAGS_FAST_LEAVE) && HAVE_DECL_MDB_FLAGS_FAST_LEAVE) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((MDB_FLAGS_FAST_LEAVE) == ((1 << 1)), "MDB_FLAGS_FAST_LEAVE != (1 << 1)"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define MDB_FLAGS_FAST_LEAVE (1 << 1) +#endif #ifndef XLAT_MACROS_ONLY @@ -14,9 +28,8 @@ static const struct xlat mdb_flags[] = { -#if defined(MDB_FLAGS_OFFLOAD) || (defined(HAVE_DECL_MDB_FLAGS_OFFLOAD) && HAVE_DECL_MDB_FLAGS_OFFLOAD) - XLAT(MDB_FLAGS_OFFLOAD), -#endif + XLAT(MDB_FLAGS_OFFLOAD), + XLAT(MDB_FLAGS_FAST_LEAVE), XLAT_END };