commit:     ca57f346afd5828d89feebbe9be741abfc9739b0
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 18 22:27:03 2025 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Dec 18 22:27:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca57f346

sys-apps/iproute2: Fix build with musl (bug #967691)

Closes: https://bugs.gentoo.org/967691
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/iproute2/files/iproute2-6.18.0-musl.patch | 41 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-6.18.0.ebuild           |  3 +-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/sys-apps/iproute2/files/iproute2-6.18.0-musl.patch 
b/sys-apps/iproute2/files/iproute2-6.18.0-musl.patch
new file mode 100644
index 000000000000..77dd1365616b
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.18.0-musl.patch
@@ -0,0 +1,41 @@
+From 6c1113633fde51b0e60f02243cfad1b3d09762cc Mon Sep 17 00:00:00 2001
+From: Akhilesh Nema <[email protected]>
+Date: Tue, 2 Dec 2025 18:11:24 -0800
+Subject: fix 'UINT_MAX' undeclared with build with musl libc
+
+- utils_math.c:136:20: error: 'UINT_MAX' undeclared (first use in this 
function)
+- tc_core.c:51:22: error: 'UINT_MAX' undeclared (first use in this function)
+
+Signed-off-by: Akhilesh Nema <[email protected]>
+---
+ lib/utils_math.c | 1 +
+ tc/tc_core.c     | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/lib/utils_math.c b/lib/utils_math.c
+index a7e747440..fd2ddc7c7 100644
+--- a/lib/utils_math.c
++++ b/lib/utils_math.c
+@@ -4,6 +4,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
++#include <limits.h>
+ #include <asm/types.h>
+ 
+ #include "utils.h"
+diff --git a/tc/tc_core.c b/tc/tc_core.c
+index a422e02c8..b13b7d78a 100644
+--- a/tc/tc_core.c
++++ b/tc/tc_core.c
+@@ -11,6 +11,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <math.h>
++#include <limits.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+-- 
+cgit 1.2.3-korg
+

diff --git a/sys-apps/iproute2/iproute2-6.18.0.ebuild 
b/sys-apps/iproute2/iproute2-6.18.0.ebuild
index 0753a4d0762f..d88b96d6f129 100644
--- a/sys-apps/iproute2/iproute2-6.18.0.ebuild
+++ b/sys-apps/iproute2/iproute2-6.18.0.ebuild
@@ -51,7 +51,8 @@ PATCHES=(
        "${FILESDIR}"/${PN}-6.9.0-mtu.patch # bug #291907
        "${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug 
#643722 & #911727
        "${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727
-       "${FILESDIR}"/${PN}-6.18.0-netshaper.patch
+       "${FILESDIR}"/${PN}-6.18.0-netshaper.patch # bug #967691
+       "${FILESDIR}"/${PN}-6.18.0-musl.patch # bug #967701
 )
 
 src_prepare() {

Reply via email to