Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion recipes/devel/m4.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit: [autotools]
inherit: [autotools, patch]

metaEnvironment:
PKG_VERSION: "1.4.20"
Expand All @@ -9,6 +9,10 @@ checkoutSCM:
digestSHA256: "e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b"
stripComponents: 1

checkoutDeterministic: True
checkoutScript: |
patchApplySeries $<@m4/*.patch@>

buildScript: |
autotoolsBuild $1

Expand Down
21 changes: 21 additions & 0 deletions recipes/devel/m4/0001-enable-l4re.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff -ur a/lib/getlocalename_l-unsafe.c b/lib/getlocalename_l-unsafe.c
--- a/lib/getlocalename_l-unsafe.c 2025-05-10 14:41:50.000000000 +0200
+++ b/lib/getlocalename_l-unsafe.c 2025-10-07 20:39:27.485874173 +0200
@@ -34,7 +34,7 @@
#endif
#include "setlocale_null.h"

-#if (__GLIBC__ >= 2 && !defined __UCLIBC__) || (defined __linux__ && HAVE_LANGINFO_H) || defined __CYGWIN__
+#if (__GLIBC__ >= 2 && !defined __UCLIBC__) || ((defined(__linux__) || defined(__l4re__)) && HAVE_LANGINFO_H) || defined __CYGWIN__
# include <langinfo.h>
#endif
#if defined __sun
@@ -484,7 +484,7 @@
nl_langinfo_l (_NL_LOCALE_NAME (category), locale). */
name = locale->__names[category];
return (struct string_with_storage) { name, STORAGE_OBJECT };
-#elif defined __linux__ && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
+#elif (defined(__linux__) || defined(__l4re__)) && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
/* musl libc */
const char *name = nl_langinfo_l (NL_LOCALE_NAME (category), locale);
return (struct string_with_storage) { name, STORAGE_OBJECT };