guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

39/45: gnu: also-utils: Adapt for glibc 2.39.


From: guix-commits
Subject: 39/45: gnu: also-utils: Adapt for glibc 2.39.
Date: Sun, 18 Feb 2024 08:41:11 -0500 (EST)

jpoiret pushed a commit to branch core-updates-glibc-2.39
in repository guix.

commit 5fa8ccb4771f02a1595e010b779e0d8d6964ffe3
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Sun Feb 18 12:05:00 2024 +0100

    gnu: also-utils: Adapt for glibc 2.39.
    
    * gnu/packages/patches/alsa-utils-strlcat-strlcpy.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/linux.scm (alsa-utils): Use it.
    
    Change-Id: I6e413934bd93ce759437dd908c1d6b43ac5d1573
---
 gnu/local.mk                                       |  1 +
 gnu/packages/linux.scm                             |  3 +-
 .../patches/alsa-utils-strlcat-strlcpy.patch       | 36 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 3e383bf359..da2a767b41 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -919,6 +919,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/akonadi-not-relocatable.patch           \
   %D%/packages/patches/akonadi-timestamps.patch                \
   %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch     \
+  %D%/packages/patches/alsa-utils-strlcat-strlcpy.patch        \
   %D%/packages/patches/alure-dumb-2.patch                      \
   %D%/packages/patches/ibus-anthy-fix-tests.patch              \
   %D%/packages/patches/ibus-table-paths.patch                  \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7f5a9e9f2c..dd0eda0ab6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2939,7 +2939,8 @@ MIDI functionality to the Linux-based operating system.")
                                  name "-" version ".tar.bz2"))
              (sha256
               (base32
-               "09m4dnn4kplawprd2bl15nwa0b4r1brab3x44ga7f1fyk7aw5zwq"))))
+               "09m4dnn4kplawprd2bl15nwa0b4r1brab3x44ga7f1fyk7aw5zwq"))
+             (patches (search-patches "alsa-utils-strlcat-strlcpy.patch"))))
     (build-system gnu-build-system)
     (arguments
      (list
diff --git a/gnu/packages/patches/alsa-utils-strlcat-strlcpy.patch 
b/gnu/packages/patches/alsa-utils-strlcat-strlcpy.patch
new file mode 100644
index 0000000000..6f4b429d00
--- /dev/null
+++ b/gnu/packages/patches/alsa-utils-strlcat-strlcpy.patch
@@ -0,0 +1,36 @@
+From d6a71bfbde9e1710743d3a446c6ea3b41c45234e Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi@heitbaum.com>
+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 <perex@perex.cz>
+---
+ alsactl/init_sysdeps.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/alsactl/init_sysdeps.c b/alsactl/init_sysdeps.c
+index 3aca1b4ae..f09b1aed7 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__ */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]