diff mbox series

[meta-multimedia,05/26] tinycompress: use unsigned int instead of glibc-only uint

Message ID 20260929225723.1046705-5-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,01/26] canvenient: include <sys/time.h> for struct timeval on musl | expand

Commit Message

Khem Raj Sept. 29, 2026, 10:57 p.m. UTC
sofprobeclient uses the bare 'uint' typedef, which is a glibc/BSD
extension musl doesn't provide. Use 'unsigned int' instead.

AI-Generated: Uses Claude Code

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 ...use-unsigned-int-instead-of-the-bare.patch | 40 +++++++++++++++++++
 .../tinycompress/tinycompress_1.2.16.bb       |  4 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 meta-multimedia/recipes-multimedia/tinycompress/files/0001-sofprobeclient-use-unsigned-int-instead-of-the-bare.patch
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/tinycompress/files/0001-sofprobeclient-use-unsigned-int-instead-of-the-bare.patch b/meta-multimedia/recipes-multimedia/tinycompress/files/0001-sofprobeclient-use-unsigned-int-instead-of-the-bare.patch
new file mode 100644
index 0000000000..7a3fb61160
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/tinycompress/files/0001-sofprobeclient-use-unsigned-int-instead-of-the-bare.patch
@@ -0,0 +1,40 @@ 
+From: Khem Raj <khem.raj@oss.qualcomm.com>
+Date: Tue, 29 Sep 2026 01:54:51 +0000
+Subject: [PATCH] sofprobeclient: use unsigned int instead of the bare uint
+ typedef
+
+uint is a legacy BSD/glibc typedef from <sys/types.h> that is only
+exposed under glibc's _DEFAULT_SOURCE feature-test macro. musl does
+not expose it by default, so probes_demux.c fails to build with
+"use of undeclared identifier 'uint'". Rather than relying on a
+feature-test macro that differs between libc implementations, use
+the portable "unsigned int" spelling directly.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
+---
+ src/utils/sofprobeclient/probes_demux.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/utils/sofprobeclient/probes_demux.c b/src/utils/sofprobeclient/probes_demux.c
+index 1111111..2222222 100644
+--- a/src/utils/sofprobeclient/probes_demux.c
++++ b/src/utils/sofprobeclient/probes_demux.c
+@@ -318,7 +318,7 @@
+
+ int parser_parse_data(struct dma_frame_parser *p, size_t d_len)
+ {
+-	uint i = 0;
++	unsigned int i = 0;
+
+ 	p->len = p->start + d_len;
+ 	/* processing all loaded bytes */
+@@ -383,7 +383,7 @@
+ 		}
+ 		/* data copying section */
+ 		if (p->total_data_to_copy > 0) {
+-			uint data_to_copy;
++			unsigned int data_to_copy;
+
+ 			/* check if there is enough bytes loaded */
+ 			/* or copy partially if not */
diff --git a/meta-multimedia/recipes-multimedia/tinycompress/tinycompress_1.2.16.bb b/meta-multimedia/recipes-multimedia/tinycompress/tinycompress_1.2.16.bb
index 50ebdd67ee..52c771f993 100644
--- a/meta-multimedia/recipes-multimedia/tinycompress/tinycompress_1.2.16.bb
+++ b/meta-multimedia/recipes-multimedia/tinycompress/tinycompress_1.2.16.bb
@@ -6,6 +6,8 @@  LICENSE = "BSD-3-Clause OR LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0"

 SRCREV = "6b064c5b614bde950560a345ca0702e76668bdab"
-SRC_URI = "git://github.com/alsa-project/tinycompress.git;branch=master;protocol=https;tag=v${PV}"
+SRC_URI = "git://github.com/alsa-project/tinycompress.git;branch=master;protocol=https;tag=v${PV} \
+           file://0001-sofprobeclient-use-unsigned-int-instead-of-the-bare.patch \
+           "

 inherit autotools pkgconfig