diff options
author | Andrew Kaster <akaster@serenityos.org> | 2023-01-14 15:14:47 -0700 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-01-21 10:43:59 -0700 |
commit | d73a1430047facddefbd465fd2f9b3d861fe66d3 (patch) | |
tree | 779b56b35b1aaf2d1a8d97642a1add86d24b70e7 /Userland/Libraries/LibC | |
parent | 5b33381875aadd8d5519a31391f3ba080b3b7199 (diff) | |
download | serenity-d73a1430047facddefbd465fd2f9b3d861fe66d3.zip |
LibC: Remove #ifdef KERNEL guard from stddef.h
We aren't including this from the Kernel anywhere anymore, so let's
simplify the file.
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r-- | Userland/Libraries/LibC/stddef.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Userland/Libraries/LibC/stddef.h b/Userland/Libraries/LibC/stddef.h index 49357f5c8b..7d9655c302 100644 --- a/Userland/Libraries/LibC/stddef.h +++ b/Userland/Libraries/LibC/stddef.h @@ -6,19 +6,15 @@ #pragma once -#define offsetof(type, member) __builtin_offsetof(type, member) - -#ifndef KERNEL +#include <sys/cdefs.h> -# include <sys/cdefs.h> +#define offsetof(type, member) __builtin_offsetof(type, member) -# ifdef __cplusplus -# define NULL nullptr -# else -# define NULL ((void*)0) -# endif +#ifdef __cplusplus +# define NULL nullptr +#else +# define NULL ((void*)0) +#endif typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __SIZE_TYPE__ size_t; - -#endif |