summaryrefslogtreecommitdiff
path: root/system/musl/amalgamation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/musl/amalgamation.patch')
-rw-r--r--system/musl/amalgamation.patch49
1 files changed, 29 insertions, 20 deletions
diff --git a/system/musl/amalgamation.patch b/system/musl/amalgamation.patch
index 5918c3be6..5e273ce7f 100644
--- a/system/musl/amalgamation.patch
+++ b/system/musl/amalgamation.patch
@@ -8,14 +8,14 @@ index e9ca94cb..b39b12ee 100644
#include <time.h>
#include <errno.h>
diff --git a/include/stdlib.h b/include/stdlib.h
-index 194c2033..5734b1f0 100644
+index b507ca33..5e14b07c 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
-@@ -39,14 +39,18 @@ void *malloc (size_t);
+@@ -41,14 +41,18 @@ void *malloc (size_t);
void *calloc (size_t, size_t);
void *realloc (void *, size_t);
void free (void *);
-+#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
++#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
void *aligned_alloc(size_t, size_t);
+#endif
@@ -23,14 +23,14 @@ index 194c2033..5734b1f0 100644
int atexit (void (*) (void));
_Noreturn void exit (int);
_Noreturn void _Exit (int);
-+#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
++#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
int at_quick_exit (void (*) (void));
_Noreturn void quick_exit (int);
+#endif
char *getenv (const char *);
-@@ -100,7 +104,6 @@ int posix_memalign (void **, size_t, size_t);
+@@ -102,7 +106,6 @@ int posix_memalign (void **, size_t, size_t);
int setenv (const char *, const char *, int);
int unsetenv (const char *);
int mkstemp (char *);
@@ -38,7 +38,7 @@ index 194c2033..5734b1f0 100644
char *mkdtemp (char *);
int getsubopt (char **, char *const *, char **);
int rand_r (unsigned *);
-@@ -138,6 +141,7 @@ void lcong48 (unsigned short [7]);
+@@ -140,6 +143,7 @@ void lcong48 (unsigned short [7]);
#include <alloca.h>
char *mktemp (char *);
int mkstemps (char *, int);
@@ -59,10 +59,10 @@ index cdc67ef6..fd773896 100644
struct itimerval {
struct timeval it_interval;
diff --git a/include/time.h b/include/time.h
-index 5494df18..2412fe22 100644
+index 3d948372..deb4a450 100644
--- a/include/time.h
+++ b/include/time.h
-@@ -58,11 +58,14 @@ struct tm *gmtime (const time_t *);
+@@ -60,11 +60,14 @@ struct tm *gmtime (const time_t *);
struct tm *localtime (const time_t *);
char *asctime (const struct tm *);
char *ctime (const time_t *);
@@ -79,7 +79,7 @@ index 5494df18..2412fe22 100644
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
-@@ -137,7 +140,10 @@ __REDIR(mktime, __mktime64);
+@@ -139,7 +142,10 @@ __REDIR(mktime, __mktime64);
__REDIR(gmtime, __gmtime64);
__REDIR(localtime, __localtime64);
__REDIR(ctime, __ctime64);
@@ -91,10 +91,10 @@ index 5494df18..2412fe22 100644
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|| defined(_BSD_SOURCE)
diff --git a/include/unistd.h b/include/unistd.h
-index 7bcbff94..6fd67160 100644
+index ee2dbe8a..ed75e578 100644
--- a/include/unistd.h
+++ b/include/unistd.h
-@@ -33,16 +33,23 @@ extern "C" {
+@@ -35,16 +35,23 @@ extern "C" {
#include <bits/alltypes.h>
int pipe(int [2]);
@@ -121,7 +121,7 @@ index 7bcbff94..6fd67160 100644
ssize_t read(int, void *, size_t);
ssize_t write(int, const void *, size_t);
ssize_t pread(int, void *, size_t, off_t);
-@@ -202,8 +209,6 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
+@@ -206,8 +213,6 @@ pid_t gettid(void);
#define off64_t off_t
#endif
@@ -130,7 +130,7 @@ index 7bcbff94..6fd67160 100644
#define _XOPEN_VERSION 700
#define _XOPEN_UNIX 1
#define _XOPEN_ENH_I18N 1
-@@ -276,6 +281,7 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
+@@ -280,6 +285,7 @@ pid_t gettid(void);
#define _PC_ALLOC_SIZE_MIN 18
#define _PC_SYMLINK_MAX 19
#define _PC_2_SYMLINKS 20
@@ -138,7 +138,7 @@ index 7bcbff94..6fd67160 100644
#define _SC_ARG_MAX 0
#define _SC_CHILD_MAX 1
-@@ -419,6 +425,7 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
+@@ -423,6 +429,7 @@ pid_t gettid(void);
#define _SC_XOPEN_STREAMS 246
#define _SC_THREAD_ROBUST_PRIO_INHERIT 247
#define _SC_THREAD_ROBUST_PRIO_PROTECT 248
@@ -146,7 +146,7 @@ index 7bcbff94..6fd67160 100644
#define _CS_PATH 0
#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1
-@@ -461,6 +468,8 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
+@@ -465,6 +472,8 @@ pid_t gettid(void);
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147
#define _CS_V6_ENV 1148
#define _CS_V7_ENV 1149
@@ -208,18 +208,27 @@ index 3baaed32..04369596 100644
if (name >= sizeof(values)/sizeof(values[0]) || !values[name]) {
diff --git a/src/locale/setlocale.c b/src/locale/setlocale.c
-index 2bc7b500..4a601eaf 100644
+index 360c4437..76dbfc37 100644
--- a/src/locale/setlocale.c
+++ b/src/locale/setlocale.c
-@@ -14,6 +14,8 @@ char *setlocale(int cat, const char *name)
+@@ -13,6 +13,8 @@ char *setlocale(int cat, const char *name)
if ((unsigned)cat > LC_ALL) return 0;
+ if (name && (!strncmp(name, "VSX4L", 5))) return 0;
+
- LOCK(lock);
+ LOCK(__locale_lock);
/* For LC_ALL, setlocale is required to return a string which
+diff --git a/src/malloc/posix_memalign.c b/src/malloc/posix_memalign.c
+index ad4d8f47..3318f86a 100644
+--- a/src/malloc/posix_memalign.c
++++ b/src/malloc/posix_memalign.c
+@@ -1,3 +1,4 @@
++#define _BSD_SOURCE
+ #include <stdlib.h>
+ #include <errno.h>
+
diff --git a/src/misc/forkpty.c b/src/misc/forkpty.c
index caf13adb..43494b96 100644
--- a/src/misc/forkpty.c
@@ -331,7 +340,7 @@ index 5af59b80..3f61d278 100644
sigaction(SIGINT, &sa, &oldint);
sigaction(SIGQUIT, &sa, &oldquit);
diff --git a/src/stdio/popen.c b/src/stdio/popen.c
-index 92cb57ee..70c5d6ec 100644
+index 3ec83394..58883b11 100644
--- a/src/stdio/popen.c
+++ b/src/stdio/popen.c
@@ -1,3 +1,4 @@
@@ -387,7 +396,7 @@ index 40ea9c1c..e396da09 100644
/* There is no other implemented value than TIME_UTC; all other values
diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c
-index 76bbd4c7..0b4564f9 100644
+index 557503eb..756a7bc4 100644
--- a/src/unistd/faccessat.c
+++ b/src/unistd/faccessat.c
@@ -1,3 +1,4 @@