]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/efivar-37-compile-fixes-3.patch
efivars: Fix build with glibc 2.36
[people/pmueller/ipfire-2.x.git] / src / patches / efivar-37-compile-fixes-3.patch
CommitLineData
79c4be10
MT
1From bc65d63ebf8fe6ac8a099ff15ca200986dba1565 Mon Sep 17 00:00:00 2001
2From: Robbie Harwood <rharwood@redhat.com>
3Date: Thu, 28 Jul 2022 16:11:24 -0400
4Subject: [PATCH] Fix glibc 2.36 build (mount.h conflicts)
5
6glibc has decided that sys/mount.h and linux/mount.h are no longer
7usable at the same time. This broke the build, since linux/fs.h itself
8includes linux/mount.h. For now, fix the build by only including
9sys/mount.h where we need it.
10
11See-also: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
12Resolves: #227
13Signed-off-by: Robbie Harwood <rharwood@redhat.com>
14---
15 src/gpt.c | 1 +
16 src/linux.c | 1 +
17 src/util.h | 1 -
18 3 files changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/src/gpt.c b/src/gpt.c
21index 1eda0497..21413c3b 100644
22--- a/src/gpt.c
23+++ b/src/gpt.c
24@@ -17,6 +17,7 @@
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <string.h>
28+#include <sys/mount.h>
29 #include <sys/param.h>
30 #include <sys/stat.h>
31 #include <sys/utsname.h>
32diff --git a/src/linux.c b/src/linux.c
33index 47e45ae4..1780816f 100644
34--- a/src/linux.c
35+++ b/src/linux.c
36@@ -20,6 +20,7 @@
37 #include <stdbool.h>
38 #include <stdio.h>
39 #include <sys/ioctl.h>
40+#include <sys/mount.h>
41 #include <sys/socket.h>
42 #include <sys/sysmacros.h>
43 #include <sys/types.h>
44diff --git a/src/util.h b/src/util.h
45index 3300666f..1e67e447 100644
46--- a/src/util.h
47+++ b/src/util.h
48@@ -23,7 +23,6 @@
49 #include <stdio.h>
50 #include <string.h>
51 #include <sys/ioctl.h>
52-#include <sys/mount.h>
53 #include <sys/stat.h>
54 #include <sys/types.h>
55 #include <tgmath.h>