Browse Source

LibC: Tolerate stddef.h being included from the kernel

This can get pulled in by <cxxabi.h>, but we don't want it pulling in
more stuff from LibC.
Andreas Kling 5 năm trước cách đây
mục cha
commit
422e5166f2
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Libraries/LibC/stddef.h

+ 4 - 0
Libraries/LibC/stddef.h

@@ -1,5 +1,7 @@
 #pragma once
 
+#ifndef KERNEL
+
 #include <sys/cdefs.h>
 #include <sys/types.h>
 
@@ -11,3 +13,5 @@
 
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
 typedef __SIZE_TYPE__ size_t;
+
+#endif