From abc150085f532f123b598949218893cb272ccc4c Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Tue, 16 Aug 2022 01:57:43 +1000 Subject: [PATCH] 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. --- Userland/Libraries/LibC/complex.h | 1 + Userland/Libraries/LibC/dirent.h | 1 + Userland/Libraries/LibC/fcntl.h | 1 + Userland/Libraries/LibC/fnmatch.h | 1 + Userland/Libraries/LibC/glob.h | 1 + Userland/Libraries/LibC/net/if.h | 1 + Userland/Libraries/LibC/netinet/in.h | 1 + Userland/Libraries/LibC/poll.h | 1 + Userland/Libraries/LibC/regex.h | 1 + Userland/Libraries/LibC/resolv.h | 1 + Userland/Libraries/LibC/serenity.h | 1 + Userland/Libraries/LibC/signal.h | 1 + Userland/Libraries/LibC/stdio_ext.h | 1 + Userland/Libraries/LibC/sys/mman.h | 1 + Userland/Libraries/LibC/sys/ptrace.h | 1 + Userland/Libraries/LibC/sys/socket.h | 1 + Userland/Libraries/LibC/sys/statvfs.h | 1 + Userland/Libraries/LibC/sys/time.h | 1 + Userland/Libraries/LibC/sys/times.h | 1 + Userland/Libraries/LibC/sys/uio.h | 1 + Userland/Libraries/LibC/sys/utsname.h | 1 + Userland/Libraries/LibC/sys/wait.h | 1 + Userland/Libraries/LibC/sys/xattr.h | 1 + Userland/Libraries/LibC/termios.h | 1 + Userland/Libraries/LibC/time.h | 1 + Userland/Libraries/LibC/unistd.h | 1 + Userland/Libraries/LibC/wctype.h | 1 + 27 files changed, 27 insertions(+) diff --git a/Userland/Libraries/LibC/complex.h b/Userland/Libraries/LibC/complex.h index a3b718e1f4a2aa..9731d22edf621d 100644 --- a/Userland/Libraries/LibC/complex.h +++ b/Userland/Libraries/LibC/complex.h @@ -12,6 +12,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/dirent.h b/Userland/Libraries/LibC/dirent.h index 1d132a3db11dd0..8f813b35bab12d 100644 --- a/Userland/Libraries/LibC/dirent.h +++ b/Userland/Libraries/LibC/dirent.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/fcntl.h b/Userland/Libraries/LibC/fcntl.h index bf640c79f5542e..73fa5ec9c9c2d9 100644 --- a/Userland/Libraries/LibC/fcntl.h +++ b/Userland/Libraries/LibC/fcntl.h @@ -9,6 +9,7 @@ #include #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/fnmatch.h b/Userland/Libraries/LibC/fnmatch.h index 3aa398b4724989..1808e7b4b567cd 100644 --- a/Userland/Libraries/LibC/fnmatch.h +++ b/Userland/Libraries/LibC/fnmatch.h @@ -6,6 +6,7 @@ #pragma once +#include #include #define FNM_NOMATCH 1 diff --git a/Userland/Libraries/LibC/glob.h b/Userland/Libraries/LibC/glob.h index ed7a545fe4af0f..3a6cd6c52f8ac7 100644 --- a/Userland/Libraries/LibC/glob.h +++ b/Userland/Libraries/LibC/glob.h @@ -6,6 +6,7 @@ #pragma once +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/net/if.h b/Userland/Libraries/LibC/net/if.h index d96333a0135d43..560d5e3bd44be9 100644 --- a/Userland/Libraries/LibC/net/if.h +++ b/Userland/Libraries/LibC/net/if.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/netinet/in.h b/Userland/Libraries/LibC/netinet/in.h index 58391c18a5a35e..3f6513d9b50e1c 100644 --- a/Userland/Libraries/LibC/netinet/in.h +++ b/Userland/Libraries/LibC/netinet/in.h @@ -8,6 +8,7 @@ #include #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/poll.h b/Userland/Libraries/LibC/poll.h index 76674684422261..3a0aa551ad2bb0 100644 --- a/Userland/Libraries/LibC/poll.h +++ b/Userland/Libraries/LibC/poll.h @@ -8,6 +8,7 @@ #include #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/regex.h b/Userland/Libraries/LibC/regex.h index a850a43ae84495..18eea479a507af 100644 --- a/Userland/Libraries/LibC/regex.h +++ b/Userland/Libraries/LibC/regex.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/resolv.h b/Userland/Libraries/LibC/resolv.h index ff0a7f34474b4c..23f4ece30ad7a6 100644 --- a/Userland/Libraries/LibC/resolv.h +++ b/Userland/Libraries/LibC/resolv.h @@ -6,6 +6,7 @@ #pragma once +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/serenity.h b/Userland/Libraries/LibC/serenity.h index 35cb299e677e77..97735d7d4fcae7 100644 --- a/Userland/Libraries/LibC/serenity.h +++ b/Userland/Libraries/LibC/serenity.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/Userland/Libraries/LibC/signal.h b/Userland/Libraries/LibC/signal.h index 2431e052dbbfc5..87012a41a37c7b 100644 --- a/Userland/Libraries/LibC/signal.h +++ b/Userland/Libraries/LibC/signal.h @@ -10,6 +10,7 @@ #include #include #include +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/stdio_ext.h b/Userland/Libraries/LibC/stdio_ext.h index b03b3dbec40c1c..57004b611b9c1d 100644 --- a/Userland/Libraries/LibC/stdio_ext.h +++ b/Userland/Libraries/LibC/stdio_ext.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/mman.h b/Userland/Libraries/LibC/sys/mman.h index d5d5ed2b4413bf..c3aaf1302d6274 100644 --- a/Userland/Libraries/LibC/sys/mman.h +++ b/Userland/Libraries/LibC/sys/mman.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/ptrace.h b/Userland/Libraries/LibC/sys/ptrace.h index b2549e1c2b983d..a240fbb6ad03fc 100644 --- a/Userland/Libraries/LibC/sys/ptrace.h +++ b/Userland/Libraries/LibC/sys/ptrace.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/socket.h b/Userland/Libraries/LibC/sys/socket.h index f37be8e7aeec8b..158ec12303b670 100644 --- a/Userland/Libraries/LibC/sys/socket.h +++ b/Userland/Libraries/LibC/sys/socket.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/statvfs.h b/Userland/Libraries/LibC/sys/statvfs.h index 0530b60d80e282..f697c5e6b86ed9 100644 --- a/Userland/Libraries/LibC/sys/statvfs.h +++ b/Userland/Libraries/LibC/sys/statvfs.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/time.h b/Userland/Libraries/LibC/sys/time.h index 8dc88f672a5715..59e2329b81d36b 100644 --- a/Userland/Libraries/LibC/sys/time.h +++ b/Userland/Libraries/LibC/sys/time.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/times.h b/Userland/Libraries/LibC/sys/times.h index 50ef1a29382810..066f1590907e92 100644 --- a/Userland/Libraries/LibC/sys/times.h +++ b/Userland/Libraries/LibC/sys/times.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/uio.h b/Userland/Libraries/LibC/sys/uio.h index cdccba1e801dbc..2ef020f9d71015 100644 --- a/Userland/Libraries/LibC/sys/uio.h +++ b/Userland/Libraries/LibC/sys/uio.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/utsname.h b/Userland/Libraries/LibC/sys/utsname.h index e5cd49b8355add..9ec62e925c96b8 100644 --- a/Userland/Libraries/LibC/sys/utsname.h +++ b/Userland/Libraries/LibC/sys/utsname.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/wait.h b/Userland/Libraries/LibC/sys/wait.h index 2091fc3fa3bee4..a5292f9ffe09b2 100644 --- a/Userland/Libraries/LibC/sys/wait.h +++ b/Userland/Libraries/LibC/sys/wait.h @@ -8,6 +8,7 @@ #include #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/sys/xattr.h b/Userland/Libraries/LibC/sys/xattr.h index 0da4ead6592fab..8efcaab334e12a 100644 --- a/Userland/Libraries/LibC/sys/xattr.h +++ b/Userland/Libraries/LibC/sys/xattr.h @@ -6,6 +6,7 @@ #pragma once +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/termios.h b/Userland/Libraries/LibC/termios.h index 3a2382c7b9da27..a8c4bc4056b0f3 100644 --- a/Userland/Libraries/LibC/termios.h +++ b/Userland/Libraries/LibC/termios.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/time.h b/Userland/Libraries/LibC/time.h index caf8d9d6e55338..dec5d75719a137 100644 --- a/Userland/Libraries/LibC/time.h +++ b/Userland/Libraries/LibC/time.h @@ -7,6 +7,7 @@ #pragma once #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h index cf3c2896fd51b8..ee4bf2f1ae9456 100644 --- a/Userland/Libraries/LibC/unistd.h +++ b/Userland/Libraries/LibC/unistd.h @@ -16,6 +16,7 @@ #include #include #include +#include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/wctype.h b/Userland/Libraries/LibC/wctype.h index 6f08a0b04b0c1f..514371c16380e6 100644 --- a/Userland/Libraries/LibC/wctype.h +++ b/Userland/Libraries/LibC/wctype.h @@ -8,6 +8,7 @@ #include #include +#include #include __BEGIN_DECLS