diff options
Diffstat (limited to 'backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch')
-rw-r--r-- | backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch b/backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch new file mode 100644 index 0000000..158288a --- /dev/null +++ b/backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch @@ -0,0 +1,36 @@ +From 7108c172f4e60c83ecc1eeb2a766eb7eaa5956d7 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen <pmatilai@redhat.com> +Date: Fri, 15 Mar 2024 10:03:26 +0200 +Subject: [PATCH] An enumeration is not a bitfield, use an integer instead + +Enums are good for individual bitfield flag names, but combination of +the bits is not a legit value really. + +Conflict:don't modify rpmfileutil.h because 8ef29094fa is not mearged; adapt context. +Reference:https://github.com/rpm-software-management/rpm/commit/7108c172f4e60c83ecc1eeb2a766eb7eaa5956d7 + +--- + include/rpm/rpmmacro.h | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/include/rpm/rpmmacro.h b/include/rpm/rpmmacro.h +index 979763a76..7b23fda59 100644 +--- a/include/rpm/rpmmacro.h ++++ b/include/rpm/rpmmacro.h +@@ -62,10 +62,11 @@ extern const char * macrofiles; + /* rpm macro expansion flags */ + #define RPMEXPAND_EXPAND_ARGS (1 << 0) /*!< expand arguments of parametric macros */ + +-typedef enum rpmMacroFlags_e { ++enum rpmMacroFlags_e { + RPMMACRO_DEFAULT = 0, + RPMMACRO_LITERAL = (1 << 0), /*!< do not expand body of macro */ +-} rpmMacroFlags; ++}; ++typedef rpmFlags rpmMacroFlags; + + /** \ingroup rpmmacro + * Print macros to file stream. +-- +2.33.0 + |