commit:     405e55107265eada57895caab0c39d0b17b5a270
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 08:08:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 08:10:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=405e5510

sys-apps/iproute2: fix build on musl

Closes: https://bugs.gentoo.org/831102
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...route2-5.16.0-fix-ax25.h-include-for-musl.patch | 23 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.16.0.ebuild           |  1 +
 2 files changed, 24 insertions(+)

diff --git 
a/sys-apps/iproute2/files/iproute2-5.16.0-fix-ax25.h-include-for-musl.patch 
b/sys-apps/iproute2/files/iproute2-5.16.0-fix-ax25.h-include-for-musl.patch
new file mode 100644
index 000000000000..8644a93ba115
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.16.0-fix-ax25.h-include-for-musl.patch
@@ -0,0 +1,23 @@
+From: Sam James <[email protected]>
+Date: Thu, 13 Jan 2022 08:05:33 +0000
+Subject: [PATCH] Fix ax25.h include for musl
+
+ax25.h isn't guaranteed to be avilable in netax25/*;
+it's dependent on our choice of libc (it's not available
+on musl at least) [0].
+
+Let's use the version from linux-headers.
+
+[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers
+Bug: https://bugs.gentoo.org/831102
+--- a/lib/ax25_ntop.c
++++ b/lib/ax25_ntop.c
+@@ -2,7 +2,7 @@
+ 
+ #include <errno.h>
+ #include <sys/socket.h>
+-#include <netax25/ax25.h>
++#include <linux/ax25.h>
+ 
+ #include "utils.h"
+ 

diff --git a/sys-apps/iproute2/iproute2-5.16.0.ebuild 
b/sys-apps/iproute2/iproute2-5.16.0.ebuild
index c26a054ac839..a86a737045cb 100644
--- a/sys-apps/iproute2/iproute2-5.16.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.16.0.ebuild
@@ -50,6 +50,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
        #"${FILESDIR}"/${PN}-5.1.0-portability.patch
        "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+       "${FILESDIR}"/${PN}-5.16.0-fix-ax25.h-include-for-musl.patch
 )
 
 doecho() {

Reply via email to