mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] efivar: Fix build issues for glibc-2.36.
Date: Thu, 22 Sep 2022 10:25:09 +0200	[thread overview]
Message-ID: <20220922082509.3534544-1-christian.melki@t2data.com> (raw)

glibc has changed usage conditions of sys/mount.h and linux/mount.h
https://github.com/rhboot/efivar/commit/bc65d63ebf8fe6ac8a099ff15ca200986dba1565

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 ...x-glibc-2.36-build-mount.h-conflicts.patch | 54 +++++++++++++++++++
 patches/efivar-38/series                      |  3 +-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 patches/efivar-38/0004-Fix-glibc-2.36-build-mount.h-conflicts.patch

diff --git a/patches/efivar-38/0004-Fix-glibc-2.36-build-mount.h-conflicts.patch b/patches/efivar-38/0004-Fix-glibc-2.36-build-mount.h-conflicts.patch
new file mode 100644
index 000000000..883e0c780
--- /dev/null
+++ b/patches/efivar-38/0004-Fix-glibc-2.36-build-mount.h-conflicts.patch
@@ -0,0 +1,54 @@
+From: Robbie Harwood <rharwood@redhat.com>
+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 <rharwood@redhat.com>
+---
+ 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 1eda04970314..21413c3b1ad0 100644
+--- a/src/gpt.c
++++ b/src/gpt.c
+@@ -17,6 +17,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/mount.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/utsname.h>
+diff --git a/src/linux.c b/src/linux.c
+index 47e45ae46e73..1780816f6343 100644
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -20,6 +20,7 @@
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <sys/ioctl.h>
++#include <sys/mount.h>
+ #include <sys/socket.h>
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
+diff --git a/src/util.h b/src/util.h
+index 3300666f4270..1e67e4476f01 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -23,7 +23,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
+-#include <sys/mount.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <tgmath.h>
diff --git a/patches/efivar-38/series b/patches/efivar-38/series
index 0c17e143b..235881843 100644
--- a/patches/efivar-38/series
+++ b/patches/efivar-38/series
@@ -3,4 +3,5 @@
 0001-src-Makefile-build-util.c-separately-for-makeguids.patch
 0002-docs-Remove-docs-building.patch
 0003-fix-building-with-binutils-2.36.patch
-# 051f21d7f5a24e87b0ddfd14b98df864  - git-ptx-patches magic
+0004-Fix-glibc-2.36-build-mount.h-conflicts.patch
+# a80afc43ec18684521a15f0f59588a87  - git-ptx-patches magic
-- 
2.34.1




             reply	other threads:[~2022-09-22  8:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  8:25 Christian Melki [this message]
2022-09-28 14:28 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220922082509.3534544-1-christian.melki@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox