diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2022-08-08 18:06:12 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-10 08:33:45 +0100 |
commit | 7fea5b909e74acbfa36b107d3bc28daa16e1c449 (patch) | |
tree | 6df2982605e3f1134b178e5e19eda46902ff477b /meta/recipes-devtools/syslinux | |
parent | 2dbb1706aa779f06f3ebc321b53d47f8dd6ed100 (diff) | |
download | poky-7fea5b909e74acbfa36b107d3bc28daa16e1c449.tar.gz |
syslinux: Fix build with glibc-2.36
* add only necessary definitions from linux/fs.h, because including
whole file causes conflicts with sys/mount.h since glibc-2.36:
http://errors.yoctoproject.org/Errors/Details/664535/
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
(From OE-Core rev: 6386aa2bf101b33e22ff7006ac51ac0a8e0741d1)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/syslinux')
-rw-r--r-- | meta/recipes-devtools/syslinux/syslinux/0012-libinstaller-Fix-build-with-glibc-2.36.patch | 56 | ||||
-rw-r--r-- | meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb | 1 |
2 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/syslinux/syslinux/0012-libinstaller-Fix-build-with-glibc-2.36.patch b/meta/recipes-devtools/syslinux/syslinux/0012-libinstaller-Fix-build-with-glibc-2.36.patch new file mode 100644 index 0000000000..b16eec0076 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/0012-libinstaller-Fix-build-with-glibc-2.36.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 0c4f97b2dd22365d32b865dd002282e454a7edf0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 6 Aug 2022 11:53:55 +0000 | ||
4 | Subject: [PATCH] libinstaller: Fix build with glibc-2.36 | ||
5 | |||
6 | * add only necessary definitions from linux/fs.h, because including whole | ||
7 | causes conflicts with sys/mount.h: | ||
8 | http://errors.yoctoproject.org/Errors/Details/664535/ | ||
9 | |||
10 | 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, | ||
11 | from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/linuxioctl.h:19, | ||
12 | from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/syslxcom.c:34: | ||
13 | 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' | ||
14 | 95 | enum fsconfig_command { | ||
15 | | ^~~~~~~~~~~~~~~~ | ||
16 | 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: | ||
17 | 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 | ||
18 | 189 | enum fsconfig_command | ||
19 | | ^~~~~~~~~~~~~~~~ | ||
20 | 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' | ||
21 | 96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ | ||
22 | | ^~~~~~~~~~~~~~~~~ | ||
23 | ... | ||
24 | |||
25 | Upstream-Status: Pending | ||
26 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
27 | --- | ||
28 | libinstaller/linuxioctl.h | 15 ++++++++++++++- | ||
29 | 1 file changed, 14 insertions(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/libinstaller/linuxioctl.h b/libinstaller/linuxioctl.h | ||
32 | index e2731c7..f4a6703 100644 | ||
33 | --- a/libinstaller/linuxioctl.h | ||
34 | +++ b/libinstaller/linuxioctl.h | ||
35 | @@ -16,7 +16,20 @@ | ||
36 | #include <linux/fd.h> /* Floppy geometry */ | ||
37 | #include <linux/hdreg.h> /* Hard disk geometry */ | ||
38 | |||
39 | -#include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */ | ||
40 | +// #include <linux/fs.h> /* FIGETBSZ, FIBMAP, FS_IOC_* */ | ||
41 | +// linux/fs.h unfortunately causes conflict with sys/mount.h since glibc-2.36 | ||
42 | +// https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E | ||
43 | +// add the necessary definitions | ||
44 | + | ||
45 | +#define FS_IOC_GETFLAGS _IOR('f', 1, long) | ||
46 | +#define FS_IOC_SETFLAGS _IOW('f', 2, long) | ||
47 | +#define FIBMAP _IO(0x00,1) /* bmap access */ | ||
48 | +#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ | ||
49 | +#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */ | ||
50 | +#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ | ||
51 | + | ||
52 | +// for musl we also need limits.h for PATH_MAX | ||
53 | +#include <linux/limits.h> | ||
54 | |||
55 | #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */ | ||
56 | #undef SECTOR_BITS | ||
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb index 0e4a23c1b4..d8dac8ccf9 100644 --- a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb +++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb | |||
@@ -20,6 +20,7 @@ SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz | |||
20 | file://0009-linux-syslinux-implement-install_bootblock.patch \ | 20 | file://0009-linux-syslinux-implement-install_bootblock.patch \ |
21 | file://0010-Workaround-multiple-definition-of-symbol-errors.patch \ | 21 | file://0010-Workaround-multiple-definition-of-symbol-errors.patch \ |
22 | file://0001-install-don-t-install-obsolete-file-com32.ld.patch \ | 22 | file://0001-install-don-t-install-obsolete-file-com32.ld.patch \ |
23 | file://0012-libinstaller-Fix-build-with-glibc-2.36.patch \ | ||
23 | file://determinism.patch \ | 24 | file://determinism.patch \ |
24 | " | 25 | " |
25 | 26 | ||