summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2020-02-19 16:28:43 -0500
committerJeremy Cline <jcline@redhat.com>2020-02-19 16:28:43 -0500
commit7e6cadeaa11ddea71b68e56a380e9315107c8365 (patch)
tree8ffc6e4a9a9a2af6fcc4acddf7e152e6a59edc57
parent5c9dca7e5c1eb454d55c2b3b867fc94374f5d686 (diff)
downloadkernel-7e6cadeaa11ddea71b68e56a380e9315107c8365.tar.gz
kernel-7e6cadeaa11ddea71b68e56a380e9315107c8365.tar.xz
kernel-7e6cadeaa11ddea71b68e56a380e9315107c8365.zip
Pick up a uapi fix for qemu (rhbz 1804330)
-rw-r--r--0001-include-uapi-Fix-invalid-use-of-BITS_PER_LONG-in-__s.patch47
-rw-r--r--kernel.spec6
2 files changed, 53 insertions, 0 deletions
diff --git a/0001-include-uapi-Fix-invalid-use-of-BITS_PER_LONG-in-__s.patch b/0001-include-uapi-Fix-invalid-use-of-BITS_PER_LONG-in-__s.patch
new file mode 100644
index 000000000..2cb6a85ae
--- /dev/null
+++ b/0001-include-uapi-Fix-invalid-use-of-BITS_PER_LONG-in-__s.patch
@@ -0,0 +1,47 @@
+From 8eab168ae074431ddd05e6478582c4dbc0847c44 Mon Sep 17 00:00:00 2001
+From: Torsten Hilbrich <torsten.hilbrich@secunet.com>
+Date: Wed, 12 Feb 2020 08:51:06 +0100
+Subject: [PATCH] include/uapi: Fix invalid use of BITS_PER_LONG in __swab
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This caused compile problems in user-space application using that
+header. Seen with systemd:
+
+In file included from /build/client/devel/kernel/_/usr/include/linux/byteorder/little_endian.h:13,
+ from /build/client/devel/kernel/_/usr/include/asm/byteorder.h: ,
+ from /build/client/devel/kernel/_/usr/include/linux/icmpv6.h:6,
+ from ../src/network/networkd-route.c:3:
+/build/client/devel/kernel/_/usr/include/linux/swab.h: In function ‘__swab’:
+/build/client/devel/kernel/_/usr/include/linux/swab.h:138:5: error: "BITS_PER_LONG" is not defined, evaluates to 0 [-Werror=undef]
+ #if BITS_PER_LONG == 64
+ ^~~~~~~~~~~~~
+cc1: some warnings being treated as errors
+[181/1207] Generating sys with a custom command.
+ninja: build stopped: subcommand failed.
+
+Signed-off-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
+---
+ include/uapi/linux/swab.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
+index fa7f97da5b76..7272f85d6d6a 100644
+--- a/include/uapi/linux/swab.h
++++ b/include/uapi/linux/swab.h
+@@ -135,9 +135,9 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
+
+ static __always_inline unsigned long __swab(const unsigned long y)
+ {
+-#if BITS_PER_LONG == 64
++#if __BITS_PER_LONG == 64
+ return __swab64(y);
+-#else /* BITS_PER_LONG == 32 */
++#else /* __BITS_PER_LONG == 32 */
+ return __swab32(y);
+ #endif
+ }
+--
+2.24.1
+
diff --git a/kernel.spec b/kernel.spec
index 4590bb7df..f9a09d9c3 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -867,6 +867,9 @@ Patch530: 0001-Replace-.ioctl-with-.compat_ioctl-in-three-appropria.patch
Patch531: 0001-mm-Avoid-creating-virtual-address-aliases-in-brk-mma.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1804330
+Patch531: 0001-include-uapi-Fix-invalid-use-of-BITS_PER_LONG-in-__s.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2896,6 +2899,9 @@ fi
#
#
%changelog
+* Wed Feb 19 2020 Jeremy Cline <jcline@redhat.com>
+- Pick up a uapi fix for qemu (rhbz 1804330)
+
* Wed Feb 19 2020 Jeremy Cline <jcline@redhat.com> - 5.6.0-0.rc2.git2.1
- Linux v5.6-rc2-47-g4b205766d8fc