Skip to content

Commit a1b0e89

Browse files
authored
Merge pull request #275 from admlck/m4-plus-l4re
m4: Add L4Re support
2 parents 5f70c6c + edd306c commit a1b0e89

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

recipes/devel/m4.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
inherit: [autotools]
1+
inherit: [autotools, patch]
22

33
metaEnvironment:
44
PKG_VERSION: "1.4.20"
@@ -9,6 +9,10 @@ checkoutSCM:
99
digestSHA256: "e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b"
1010
stripComponents: 1
1111

12+
checkoutDeterministic: True
13+
checkoutScript: |
14+
patchApplySeries $<@m4/*.patch@>
15+
1216
buildScript: |
1317
autotoolsBuild $1
1418
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff -ur a/lib/getlocalename_l-unsafe.c b/lib/getlocalename_l-unsafe.c
2+
--- a/lib/getlocalename_l-unsafe.c 2025-05-10 14:41:50.000000000 +0200
3+
+++ b/lib/getlocalename_l-unsafe.c 2025-10-07 20:39:27.485874173 +0200
4+
@@ -34,7 +34,7 @@
5+
#endif
6+
#include "setlocale_null.h"
7+
8+
-#if (__GLIBC__ >= 2 && !defined __UCLIBC__) || (defined __linux__ && HAVE_LANGINFO_H) || defined __CYGWIN__
9+
+#if (__GLIBC__ >= 2 && !defined __UCLIBC__) || ((defined(__linux__) || defined(__l4re__)) && HAVE_LANGINFO_H) || defined __CYGWIN__
10+
# include <langinfo.h>
11+
#endif
12+
#if defined __sun
13+
@@ -484,7 +484,7 @@
14+
nl_langinfo_l (_NL_LOCALE_NAME (category), locale). */
15+
name = locale->__names[category];
16+
return (struct string_with_storage) { name, STORAGE_OBJECT };
17+
-#elif defined __linux__ && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
18+
+#elif (defined(__linux__) || defined(__l4re__)) && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
19+
/* musl libc */
20+
const char *name = nl_langinfo_l (NL_LOCALE_NAME (category), locale);
21+
return (struct string_with_storage) { name, STORAGE_OBJECT };

0 commit comments

Comments
 (0)