mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-15 18:27:12 +00:00
netcat-openbsd: define IPTOS_DSCP_VA for musl
netcat.c uses IPTOS_DSCP_VA, which glibc's <netinet/ip.h> defines but musl's doesn't. Add a guarded fallback definition. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
2 files changed
+35
No files matched your search
+34
@@ -0,0 +1,34 @@
|
||||
From: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
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 <netinet/ip.h> defines
|
||||
IPTOS_DSCP_VA as 0xb0, but musl's <netinet/ip.h> 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 <khem.raj@oss.qualcomm.com>
|
||||
---
|
||||
--- 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 <ctype.h>
|
||||
#include <err.h>
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user