From 02c6c7041b50921119e4eab4890c7761a9be70a627c0840ba93c346caf44d421 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 18 Jul 2018 08:58:28 +0000 Subject: [PATCH] - Add enum.patch. OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=148 --- enum.patch | 37 +++++++++++++++++++++++++++++++++++++ kmod.changes | 5 +++++ kmod.spec | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 enum.patch diff --git a/enum.patch b/enum.patch new file mode 100644 index 0000000..4cda1cf --- /dev/null +++ b/enum.patch @@ -0,0 +1,37 @@ +From d5840458e01184e068a0226ec636cb1a454a1386 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Wed, 18 Jul 2018 10:39:12 +0200 +Subject: [PATCH] libkmod: drop _PAD enum constants + +When are enums ever mapped to something smaller than int, other than +willful packing into a bitfield? +[Remove it until there is a better reasoning for its existence.] +--- + libkmod/libkmod.h | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h +index 352627e..4fb5ba8 100644 +--- a/libkmod/libkmod.h ++++ b/libkmod/libkmod.h +@@ -71,8 +71,6 @@ enum kmod_index { + KMOD_INDEX_MODULES_ALIAS, + KMOD_INDEX_MODULES_SYMBOL, + KMOD_INDEX_MODULES_BUILTIN, +- /* Padding to make sure enum is not mapped to char */ +- _KMOD_INDEX_PAD = (1 << 31), + }; + int kmod_dump_index(struct kmod_ctx *ctx, enum kmod_index type, int fd); + +@@ -210,8 +208,6 @@ enum kmod_module_initstate { + KMOD_MODULE_LIVE, + KMOD_MODULE_COMING, + KMOD_MODULE_GOING, +- /* Padding to make sure enum is not mapped to char */ +- _KMOD_MODULE_PAD = (1 << 31), + }; + const char *kmod_module_initstate_str(enum kmod_module_initstate state); + int kmod_module_get_initstate(const struct kmod_module *mod); +-- +2.18.0 + diff --git a/kmod.changes b/kmod.changes index 6466270..fa6e1cf 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 18 08:51:06 UTC 2018 - jengelh@inai.de + +- Add enum.patch. + ------------------------------------------------------------------- Fri Jun 8 21:37:14 UTC 2018 - vlad.botanic@gmail.com diff --git a/kmod.spec b/kmod.spec index 70db632..a6e376e 100644 --- a/kmod.spec +++ b/kmod.spec @@ -38,6 +38,7 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: libkmod-signature-Fix-crash-when-module-signature-is.patch Patch7: libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch Patch8: 0012-modprobe-print-unsupported-status.patch +Patch9: enum.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asn1c BuildRequires: autoconf @@ -110,7 +111,7 @@ in %lname. %prep %setup -q -n kmod-%version -%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -p1 +%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -P 9 -p1 %build autoreconf -fi