summaryrefslogtreecommitdiff
path: root/system/musl/stdio.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-03-18 23:19:22 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-03-18 23:19:22 +0000
commit0d7d0dd6b6c5ec2fc29009001cb70c7b5a666257 (patch)
tree62fdc6c67f1cd9e86b8cb82d866085fdbeb4aa15 /system/musl/stdio.patch
parent39053440b7bc0227ee208c6251cc4a140fb37350 (diff)
downloadpackages-0d7d0dd6b6c5ec2fc29009001cb70c7b5a666257.tar.gz
packages-0d7d0dd6b6c5ec2fc29009001cb70c7b5a666257.tar.bz2
packages-0d7d0dd6b6c5ec2fc29009001cb70c7b5a666257.tar.xz
packages-0d7d0dd6b6c5ec2fc29009001cb70c7b5a666257.zip
system/musl: more POSIX stuff
Diffstat (limited to 'system/musl/stdio.patch')
-rw-r--r--system/musl/stdio.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/system/musl/stdio.patch b/system/musl/stdio.patch
new file mode 100644
index 000000000..9ddfa5738
--- /dev/null
+++ b/system/musl/stdio.patch
@@ -0,0 +1,69 @@
+diff --git a/include/alltypes.h.in b/include/alltypes.h.in
+index 622ca01..4cc879b 100644
+--- a/include/alltypes.h.in
++++ b/include/alltypes.h.in
+@@ -57,6 +57,7 @@ TYPEDEF struct { unsigned __attr; } pthread_condattr_t;
+ TYPEDEF struct { unsigned __attr; } pthread_barrierattr_t;
+ TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;
+
++STRUCT _IO_FILE { char __x; };
+ TYPEDEF struct _IO_FILE FILE;
+
+ TYPEDEF struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
+diff --git a/include/stdio.h b/include/stdio.h
+index afadd91..3604198 100644
+--- a/include/stdio.h
++++ b/include/stdio.h
+@@ -11,6 +11,10 @@ extern "C" {
+ #define __NEED___isoc_va_list
+ #define __NEED_size_t
+
++#if __STDC_VERSION__ < 201112L
++#define __NEED_struct__IO_FILE
++#endif
++
+ #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
+diff --git a/include/wchar.h b/include/wchar.h
+index 369b1e9..88eb55b 100644
+--- a/include/wchar.h
++++ b/include/wchar.h
+@@ -14,6 +14,10 @@ extern "C" {
+ #define __NEED_wint_t
+ #define __NEED_mbstate_t
+
++#if __STDC_VERSION__ < 201112L
++#define __NEED_struct__IO_FILE
++#endif
++
+ #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+ #define __NEED_locale_t
+diff --git a/src/include/stdio.h b/src/include/stdio.h
+index 534c690..fae3755 100644
+--- a/src/include/stdio.h
++++ b/src/include/stdio.h
+@@ -1,6 +1,8 @@
+ #ifndef STDIO_H
+ #define STDIO_H
+
++#define __DEFINED_struct__IO_FILE
++
+ #include "../../include/stdio.h"
+
+ #undef stdin
+diff --git a/src/include/wchar.h b/src/include/wchar.h
+index e69de29..79f5d0e 100644
+--- a/src/include/wchar.h
++++ b/src/include/wchar.h
+@@ -0,0 +1,9 @@
++#ifndef WCHAR_H
++#define WCHAR_H
++
++#define __DEFINED_struct__IO_FILE
++
++#include "../../include/wchar.h"
++
++#endif
++