Accepting request 624075 from Base:System

- Add enum.patch.

OBS-URL: https://build.opensuse.org/request/show/624075
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=51
This commit is contained in:
Dominique Leuenberger 2018-07-28 10:38:04 +00:00 committed by Git OBS Bridge
commit 61da458c11
3 changed files with 44 additions and 1 deletions

37
enum.patch Normal file
View File

@ -0,0 +1,37 @@
From d5840458e01184e068a0226ec636cb1a454a1386 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
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

View File

@ -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

View File

@ -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