commit:     f3da37ce12b4586cbd64a0434874b8144e000082
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  6 12:07:12 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Oct  6 12:35:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3da37ce

sys-boot/syslinux: fix building on musl

Safe patch, which adds an include to <stdint.h>, and #define
conditionally if not defined the missing types.

Closes: https://bugs.gentoo.org/626952
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 sys-boot/syslinux/files/syslinux-musl.patch    | 24 ++++++++++++++++++++++++
 sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild |  1 +
 sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild |  1 +
 3 files changed, 26 insertions(+)

diff --git a/sys-boot/syslinux/files/syslinux-musl.patch 
b/sys-boot/syslinux/files/syslinux-musl.patch
new file mode 100644
index 000000000000..31a4df4c865a
--- /dev/null
+++ b/sys-boot/syslinux/files/syslinux-musl.patch
@@ -0,0 +1,24 @@
+--- a/efi/wrapper.h
++++ b/efi/wrapper.h
+@@ -26,6 +26,21 @@
+ #define __packed      __attribute__((packed))
+ #define OFFSETOF(t,m) ((size_t)&((t *)0)->m)
+
++#include <stdint.h>
++
++#ifndef __uint8_t
++#define __uint8_t uint8_t
++#endif
++#ifndef __uint16_t
++#define __uint16_t uint16_t
++#endif
++#ifndef __uint32_t
++#define __uint32_t uint32_t
++#endif
++#ifndef __uint64_t
++#define __uint64_t uint64_t
++#endif
++
+ struct header {
+       __uint16_t msdos_signature;
+       __uint8_t _pad1[0x16];

diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild 
b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild
index 111b2e04c1b1..4280886494b2 100644
--- a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild
+++ b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild
@@ -48,6 +48,7 @@ src_prepare() {
                "${FILESDIR}/syslinux-6.03-sysmacros.patch"
                "${FILESDIR}/${PV}"
                "${FILESDIR}/syslinux-6.04-binutils-2.41.patch"
+               "${FILESDIR}/syslinux-musl.patch"
        )
        default
 

diff --git a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild 
b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild
index 0afea508fbc5..54ba79b89d9b 100644
--- a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild
+++ b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild
@@ -50,6 +50,7 @@ src_prepare() {
        local PATCHES=(
                "${FILESDIR}/6.04_pre1"
                "${FILESDIR}/6.04_pre3"
+               "${FILESDIR}/syslinux-musl.patch"
        )
        default
 

Reply via email to