From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 13/15] syslinux: Fix build against glibc 2.36
Date: Mon, 15 Aug 2022 17:17:51 +0000 [thread overview]
Message-ID: <20220815171753.1858688-13-michael.tremer@ipfire.org> (raw)
In-Reply-To: <20220815171753.1858688-1-michael.tremer@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 4408 bytes --]
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
lfs/syslinux | 1 +
...binstaller-Fix-build-with-glibc-2.36.patch | 56 +++++++++++++++++++
2 files changed, 57 insertions(+)
create mode 100644 src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch
diff --git a/lfs/syslinux b/lfs/syslinux
index d90032cd9..150e4071e 100644
--- a/lfs/syslinux
+++ b/lfs/syslinux
@@ -79,6 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.03-sysmacros.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04_replace-builtin-strlen-that-appears-to-get-optimized.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04_pre1-fcommon.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch
# Build
cd $(DIR_APP) && make bios $(MAKETUNING)
diff --git a/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch b/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch
new file mode 100644
index 000000000..b16eec007
--- /dev/null
+++ b/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch
@@ -0,0 +1,56 @@
+From 0c4f97b2dd22365d32b865dd002282e454a7edf0 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa(a)gmail.com>
+Date: Sat, 6 Aug 2022 11:53:55 +0000
+Subject: [PATCH] libinstaller: Fix build with glibc-2.36
+
+* add only necessary definitions from linux/fs.h, because including whole
+ causes conflicts with sys/mount.h:
+ http://errors.yoctoproject.org/Errors/Details/664535/
+
+In file included from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/linux/fs.h:19,
+ from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/linuxioctl.h:19,
+ from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/syslxcom.c:34:
+TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command'
+ 95 | enum fsconfig_command {
+ | ^~~~~~~~~~~~~~~~
+In file included from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/syslxcom.c:31:
+TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/sys/mount.h:189:6: note: originally defined here
+ 189 | enum fsconfig_command
+ | ^~~~~~~~~~~~~~~~
+TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/linux/mount.h:96:9: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
+ 96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+ | ^~~~~~~~~~~~~~~~~
+...
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa(a)gmail.com>
+---
+ libinstaller/linuxioctl.h | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/libinstaller/linuxioctl.h b/libinstaller/linuxioctl.h
+index e2731c7..f4a6703 100644
+--- a/libinstaller/linuxioctl.h
++++ b/libinstaller/linuxioctl.h
+@@ -16,7 +16,20 @@
+ #include <linux/fd.h> /* Floppy geometry */
+ #include <linux/hdreg.h> /* Hard disk geometry */
+
+-#include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */
++// #include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */
++// linux/fs.h unfortunately causes conflict with sys/mount.h since glibc-2.36
++// https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
++// add the necessary definitions
++
++#define FS_IOC_GETFLAGS _IOR('f', 1, long)
++#define FS_IOC_SETFLAGS _IOW('f', 2, long)
++#define FIBMAP _IO(0x00,1) /* bmap access */
++#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */
++#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */
++#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */
++
++// for musl we also need limits.h for PATH_MAX
++#include <linux/limits.h>
+
+ #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */
+ #undef SECTOR_BITS
--
2.30.2
next prev parent reply other threads:[~2022-08-15 17:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 17:17 [PATCH 01/15] sysvinit: " Michael Tremer
2022-08-15 17:17 ` [PATCH 02/15] gcc: " Michael Tremer
2022-08-15 17:17 ` [PATCH 03/15] binutils: Update to 2.39 Michael Tremer
2022-08-15 17:17 ` [PATCH 04/15] glibc: Update to 2.36 Michael Tremer
2022-08-15 17:17 ` [PATCH 05/15] make.sh: Bump toolchain version Michael Tremer
2022-08-15 17:17 ` [PATCH 06/15] efivars: Fix build with glibc 2.36 Michael Tremer
2022-08-15 17:17 ` [PATCH 07/15] libarchive: " Michael Tremer
2022-08-15 17:17 ` [PATCH 08/15] hdparm: " Michael Tremer
2022-08-15 17:17 ` [PATCH 09/15] samba: " Michael Tremer
2022-08-15 17:17 ` [PATCH 10/15] qemu: Fix build against " Michael Tremer
2022-08-15 17:17 ` [PATCH 11/15] collected: Fix build with " Michael Tremer
2022-08-15 17:17 ` [PATCH 12/15] libvirt: Fix build against " Michael Tremer
2022-08-15 17:17 ` Michael Tremer [this message]
2022-08-15 17:17 ` [PATCH 14/15] installer: " Michael Tremer
2022-08-15 17:17 ` [PATCH 15/15] u-boot: Ignore LOAD segments with RWX permissions Michael Tremer
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=20220815171753.1858688-13-michael.tremer@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/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