Signed-off-by: Martin Jansa <[email protected]>
---
 ...dd-define-to-compile-with-glibc-2.38.patch | 39 +++++++++++++++++++
 .../alsa/alsa-utils_1.2.9.bb                  |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 
meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-add-define-to-compile-with-glibc-2.38.patch

diff --git 
a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-add-define-to-compile-with-glibc-2.38.patch
 
b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-add-define-to-compile-with-glibc-2.38.patch
new file mode 100644
index 0000000000..8c23fb2cec
--- /dev/null
+++ 
b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-add-define-to-compile-with-glibc-2.38.patch
@@ -0,0 +1,39 @@
+From a610f4c21b083c0f9cf62ad2251dfadc98abb50e Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <[email protected]>
+Date: Sat, 22 Jul 2023 15:36:09 +0000
+Subject: [PATCH] alsactl: add define to compile with glibc 2.38
+
+strlcat and strlcpy have been added to glibc 2.38.
+update the defines to use the glibc versions, and not conflict with
+string.h.
+
+ref:
+- 
https://sourceware.org/git/?p=glibc.git;a=commit;h=454a20c8756c9c1d55419153255fc7692b3d2199
+
+Fixes: https://github.com/alsa-project/alsa-utils/pull/225
+Signed-off-by: Jaroslav Kysela <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>
+
+Upstream-Status: Backport 
[https://github.com/alsa-project/alsa-utils/commit/d6a71bfbde9e1710743d3a446c6ea3b41c45234e]
+---
+ alsactl/init_sysdeps.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/alsactl/init_sysdeps.c b/alsactl/init_sysdeps.c
+index 3aca1b4..f09b1ae 100644
+--- a/alsactl/init_sysdeps.c
++++ b/alsactl/init_sysdeps.c
+@@ -18,6 +18,7 @@
+  */
+ 
+ #if defined(__GLIBC__) && !(defined(__UCLIBC__) && defined(__USE_BSD))
++#if !(__GLIBC_PREREQ(2, 38))
+ static size_t strlcpy(char *dst, const char *src, size_t size)
+ {
+       size_t bytes = 0;
+@@ -60,4 +61,5 @@ static size_t strlcat(char *dst, const char *src, size_t 
size)
+       *q = '\0';
+       return bytes;
+ }
++#endif /* !(__GLIBC_PREREQ(2, 38)) */
+ #endif /* __GLIBC__ */
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.2.9.bb 
b/meta/recipes-multimedia/alsa/alsa-utils_1.2.9.bb
index 2f344015a9..af28f5468f 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.2.9.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.2.9.bb
@@ -26,6 +26,7 @@ PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, 
xmlto-native docbook
 # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
 SRC_URI = 
"https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2 \
            file://0001-alsactl-fix-compilation-when-building-in-a-subdir.patch 
\
+           file://0001-alsactl-add-define-to-compile-with-glibc-2.38.patch \
           "
 SRC_URI[sha256sum] = 
"e7623d4525595f92e11ce25ee9a97f2040a14c6e4dcd027aa96e06cbce7817bd"
 
-- 
2.41.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185224): 
https://lists.openembedded.org/g/openembedded-core/message/185224
Mute This Topic: https://lists.openembedded.org/mt/100479645/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to