From 2f0179930e89ee86a980c658588be0ad64b1c4d317e7786ac260596774ad91cd Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Wed, 10 Aug 2022 05:42:51 +0000 Subject: [PATCH] Accepting request 994221 from home:gary_lin:branches:Base:System - Add efivar-bsc1202209-fix-glibc-2.36-build.patch to fix the build error against glibc 2.36 (bsc#1202209) OBS-URL: https://build.opensuse.org/request/show/994221 OBS-URL: https://build.opensuse.org/package/show/Base:System/efivar?expand=0&rev=52 --- efivar-bsc1202209-fix-glibc-2.36-build.patch | 58 ++++++++++++++++++++ efivar.changes | 6 ++ efivar.spec | 4 +- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 efivar-bsc1202209-fix-glibc-2.36-build.patch diff --git a/efivar-bsc1202209-fix-glibc-2.36-build.patch b/efivar-bsc1202209-fix-glibc-2.36-build.patch new file mode 100644 index 0000000..e5af06d --- /dev/null +++ b/efivar-bsc1202209-fix-glibc-2.36-build.patch @@ -0,0 +1,58 @@ +From bc65d63ebf8fe6ac8a099ff15ca200986dba1565 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Thu, 28 Jul 2022 16:11:24 -0400 +Subject: [PATCH] Fix glibc 2.36 build (mount.h conflicts) + +glibc has decided that sys/mount.h and linux/mount.h are no longer +usable at the same time. This broke the build, since linux/fs.h itself +includes linux/mount.h. For now, fix the build by only including +sys/mount.h where we need it. + +See-also: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E +Resolves: #227 +Signed-off-by: Robbie Harwood +--- + src/gpt.c | 1 + + src/linux.c | 1 + + src/util.h | 1 - + 3 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/gpt.c b/src/gpt.c +index 1eda049..21413c3 100644 +--- a/src/gpt.c ++++ b/src/gpt.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/linux.c b/src/linux.c +index 47e45ae..1780816 100644 +--- a/src/linux.c ++++ b/src/linux.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/util.h b/src/util.h +index 3300666..1e67e44 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -23,7 +23,6 @@ + #include + #include + #include +-#include + #include + #include + #include +-- +2.35.3 + diff --git a/efivar.changes b/efivar.changes index a504015..93c971e 100644 --- a/efivar.changes +++ b/efivar.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 10 01:54:21 UTC 2022 - Gary Ching-Pang Lin + +- Add efivar-bsc1202209-fix-glibc-2.36-build.patch to fix the build + error against glibc 2.36 (bsc#1202209) + ------------------------------------------------------------------- Wed Jun 16 06:45:21 UTC 2021 - Gary Ching-Pang Lin diff --git a/efivar.spec b/efivar.spec index 9d93c05..be0fc52 100644 --- a/efivar.spec +++ b/efivar.spec @@ -1,7 +1,7 @@ # # spec file for package efivar # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -45,6 +45,7 @@ Patch4: efivar-fix-efidp_ipv4_addr-fields-assignment.patch Patch5: efivar-bsc1175989-handle-NULL-set-variable.patch Patch6: efivar-bsc1181967-fix-nvme-parsing.patch Patch7: efivar-bsc1187386-fix-emmc-parsing.patch +Patch8: efivar-bsc1202209-fix-glibc-2.36-build.patch %if "0%{?buildroot}" == "0" # set a sane value for buildroot, unless it's already there! BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -94,6 +95,7 @@ perl -pi -e 's{\#include \}{typedef __CHAR16_TYPE__ char16_t;}' \ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build CFLAGS="%{optflags} -Wno-nonnull -flto"