浏览代码

LibC: Add missing sys/cdefs.h include

Some header files use __BEGIN_DECLS without including sys/cdefs.h.
This causes issues for C code that compiles against these headers,
which may occur with Ports.
Emily Trau 2 年之前
父节点
当前提交
abc150085f

+ 1 - 0
Userland/Libraries/LibC/complex.h

@@ -12,6 +12,7 @@
 #pragma once
 
 #include <stddef.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/dirent.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/dirent.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/fcntl.h

@@ -9,6 +9,7 @@
 
 #include <Kernel/API/POSIX/fcntl.h>
 #include <Kernel/API/POSIX/sys/stat.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/fnmatch.h

@@ -6,6 +6,7 @@
 
 #pragma once
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #define FNM_NOMATCH 1

+ 1 - 0
Userland/Libraries/LibC/glob.h

@@ -6,6 +6,7 @@
 
 #pragma once
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/net/if.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/net/if.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/netinet/in.h

@@ -8,6 +8,7 @@
 
 #include <Kernel/API/POSIX/netinet/in.h>
 #include <endian.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/poll.h

@@ -8,6 +8,7 @@
 
 #include <Kernel/API/POSIX/poll.h>
 #include <signal.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/regex.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <stddef.h>
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/resolv.h

@@ -6,6 +6,7 @@
 
 #pragma once
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/serenity.h

@@ -9,6 +9,7 @@
 #include <Kernel/API/POSIX/futex.h>
 #include <Kernel/API/POSIX/serenity.h>
 #include <stdio.h>
+#include <sys/cdefs.h>
 #include <time.h>
 #include <unistd.h>
 

+ 1 - 0
Userland/Libraries/LibC/signal.h

@@ -10,6 +10,7 @@
 #include <Kernel/API/POSIX/ucontext.h>
 #include <bits/sighow.h>
 #include <signal_numbers.h>
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/stdio_ext.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <stdio.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/mman.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/mman.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/ptrace.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/ptrace.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/socket.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/socket.h>
+#include <sys/cdefs.h>
 #include <sys/un.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/sys/statvfs.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/statvfs.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/time.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/time.h>
+#include <sys/cdefs.h>
 #include <time.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/sys/times.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/times.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/uio.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/uio.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/utsname.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/sys/utsname.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/wait.h

@@ -8,6 +8,7 @@
 
 #include <Kernel/API/POSIX/signal.h>
 #include <Kernel/API/POSIX/sys/wait.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/sys/xattr.h

@@ -6,6 +6,7 @@
 
 #pragma once
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS

+ 1 - 0
Userland/Libraries/LibC/termios.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/termios.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/time.h

@@ -7,6 +7,7 @@
 #pragma once
 
 #include <Kernel/API/POSIX/time.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/unistd.h

@@ -16,6 +16,7 @@
 #include <Kernel/API/POSIX/unistd.h>
 #include <fd_set.h>
 #include <limits.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 

+ 1 - 0
Userland/Libraries/LibC/wctype.h

@@ -8,6 +8,7 @@
 
 #include <assert.h>
 #include <ctype.h>
+#include <sys/cdefs.h>
 #include <wchar.h>
 
 __BEGIN_DECLS