diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd/0002-netcat-define-IPTOS_DSCP_VA-for-musl.patch b/meta-networking/recipes-support/netcat/netcat-openbsd/0002-netcat-define-IPTOS_DSCP_VA-for-musl.patch new file mode 100644 index 0000000000..2b642b26b6 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat-openbsd/0002-netcat-define-IPTOS_DSCP_VA-for-musl.patch @@ -0,0 +1,34 @@ +From: Khem Raj +Date: Tue, 29 Sep 2026 02:14:39 +0000 +Subject: [PATCH] netcat: define IPTOS_DSCP_VA for musl + +netcat.c uses IPTOS_DSCP_VA (the RFC 5865 Voice-Admit DSCP codepoint) +as one of the recognized --tos names. glibc's defines +IPTOS_DSCP_VA as 0xb0, but musl's does not define it at +all, so the build fails with "use of undeclared identifier +'IPTOS_DSCP_VA'". + +Add the same fallback definition already used here for the other +IPTOS_DSCP_* codepoints missing on musl (see the neighboring +IPTOS_DSCP_EF block). 0xb0 is DSCP value 44 (decimal) shifted into the +TOS byte's DSCP field, i.e. (44 << 2), matching glibc's value. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- +--- a/netcat.c ++++ b/netcat.c +@@ -89,6 +89,13 @@ + # define IPTOS_DSCP_EF 0xb8 + #endif /* IPTOS_DSCP_EF */ + ++/* Voice-Admit DSCP codepoint (RFC 5865): decimal 44 shifted into the TOS ++ * byte's DSCP field, i.e. (44 << 2). glibc's netinet/ip.h defines this as ++ * 0xb0; musl's does not carry it at all yet. */ ++#ifndef IPTOS_DSCP_VA ++# define IPTOS_DSCP_VA 0xb0 ++#endif /* IPTOS_DSCP_VA */ ++ + + #include + #include diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.238.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.238.bb index 01eafa06d0..e7272dc0a9 100644 --- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.238.bb +++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.238.bb @@ -10,6 +10,7 @@ do_patch[depends] = "quilt-native:do_populate_sysroot" SRC_URI = "http://snapshot.debian.org/archive/debian/20260519T203124Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \ http://snapshot.debian.org/archive/debian/20260519T203124Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-1.debian.tar.xz;name=netcat-patch;subdir=${BP} \ file://0001-bundle-own-base64-encode-decode-functions.patch \ + file://0002-netcat-define-IPTOS_DSCP_VA-for-musl.patch \ " SRC_URI[netcat.sha256sum] = "9f72a37d85dec1366309fdb0172be4e67e09ec26e89f13156315149e17c02479"