From: Michael Tremer Date: Wed, 24 Oct 2018 08:14:43 +0000 (+0100) Subject: syslinux: Fix build with glibc >= 2.28 X-Git-Tag: v2.21-core125~42^2~3 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=5814cf9931c0c8cda07e70e47b6cf3f02bbc8397 syslinux: Fix build with glibc >= 2.28 Signed-off-by: Michael Tremer --- diff --git a/lfs/syslinux b/lfs/syslinux index eecf3aefa3..1670da27e6 100644 --- a/lfs/syslinux +++ b/lfs/syslinux @@ -75,6 +75,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + # Apply patches + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.03-sysmacros.patch + # Build cd $(DIR_APP) && make bios $(MAKETUNING) ifeq "$(BUILD_ARCH)" "x86_64" diff --git a/src/patches/syslinux-6.03-sysmacros.patch b/src/patches/syslinux-6.03-sysmacros.patch new file mode 100644 index 0000000000..af464fe534 --- /dev/null +++ b/src/patches/syslinux-6.03-sysmacros.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/579928 + +From d84db34dbe39d55b4d7e868764c056689aa0793b Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 19 Apr 2016 01:56:41 -0400 +Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev + +These functions are defined in sys/sysmacros.h, so add the include to +main.c. This is already handled correctly in mountinfo.c. Otherwise +we get build failures like: + +main.o: In function 'find_device_sysfs': +extlinux/main.c:1131: undefined reference to 'minor' + +Signed-off-by: Mike Frysinger +--- + extlinux/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/extlinux/main.c b/extlinux/main.c +index a7ebd49..ebff7ea 100644 +--- a/extlinux/main.c ++++ b/extlinux/main.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.7.4 +