From 321934b161d16172f3e9e9b8d8a3050ef78699e6 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Tue, 23 Aug 2022 19:48:50 -0700 Subject: [PATCH] efivar: fix build for glibc 2.36 --- .../patches/fix-compat-glibc-2.36.patch | 55 +++++++++++++++++++ srcpkgs/efivar/template | 8 +-- 2 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/efivar/patches/fix-compat-glibc-2.36.patch diff --git a/srcpkgs/efivar/patches/fix-compat-glibc-2.36.patch b/srcpkgs/efivar/patches/fix-compat-glibc-2.36.patch new file mode 100644 index 00000000000..fcc83aef20c --- /dev/null +++ b/srcpkgs/efivar/patches/fix-compat-glibc-2.36.patch @@ -0,0 +1,55 @@ +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 1eda0497..21413c3b 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 47e45ae4..1780816f 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 3300666f..1e67e447 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -23,7 +23,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/srcpkgs/efivar/template b/srcpkgs/efivar/template index 39be825fab2..9a21d44175b 100644 --- a/srcpkgs/efivar/template +++ b/srcpkgs/efivar/template @@ -1,8 +1,11 @@ # Template file for 'efivar' pkgname=efivar version=37 -revision=1 +revision=2 build_style=gnu-makefile +make_build_args="libdir=/usr/lib" +make_build_target="all test" +make_install_args="libdir=/usr/lib" hostmakedepends="pkg-config" short_desc="Tools to manipulate EFI variables" maintainer="Orphaned " @@ -10,9 +13,6 @@ license="LGPL-2.1-or-later" homepage="https://github.com/rhinstaller/efivar" distfiles="https://github.com/rhboot/efivar/releases/download/${version}/efivar-${version}.tar.bz2" checksum=3c67feb93f901b98fbb897d5ca82931a6698b5bcd6ac34f0815f670d77747b9f -make_build_args="libdir=/usr/lib" -make_build_target="all test" -make_install_args="libdir=/usr/lib" CFLAGS="-D_GNU_SOURCE -Wno-error=address-of-packed-member"