shithub: scc

Download patch

ref: 221526b92844eaea8c35fd64ca855cde3e9a7a96
parent: 3367504a83d695f670edea4382b87b1ba17f7893
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Jun 13 14:34:49 EDT 2020

libc: Add sys/cdefs.h

This new header contains all the common definitions of the
system in only one file. It makes easier to port to
new systems and to fix errors.

--- a/include/locale.h
+++ b/include/locale.h
@@ -2,6 +2,7 @@
 #define _LOCALE_H
 
 #define _NEED_NULL
+#include <sys/cdefs.h>
 #include <arch/cdefs.h>
 
 #define LC_ALL      0
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -5,6 +5,7 @@
 #define _NEED_WCHAR_T
 #define _NEED_PTRDIFFT
 #define _NEED_NULL
+#include <sys/cdefs.h>
 #include <arch/cdefs.h>
 
 #define offsetof(st, m) ((size_t)&(((st *)0)->m))
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -4,6 +4,7 @@
 #define _NEED_NULL
 #define _NEED_SIZET
 #define _NEED_WCHART
+#include <sys/cdefs.h>
 #include <arch/cdefs.h>
 #include <arch/stdlib.h>
 
--- a/include/string.h
+++ b/include/string.h
@@ -3,6 +3,7 @@
 
 #define _NEED_SIZET
 #define _NEED_NULL
+#include <sys/cdefs.h>
 #include <arch/cdefs.h>
 #include <arch/string.h>
 
--- a/include/time.h
+++ b/include/time.h
@@ -3,6 +3,7 @@
 
 #define _NEED_SIZET
 #define _NEED_NULL
+#include <sys/cdefs.h>
 #include <arch/cdefs.h>
 #include <arch/time.h>