Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156432780
D55453.id172632.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
825 B
Referenced Files
None
Subscribers
None
D55453.id172632.diff
View Options
diff --git a/tools/build/stddef.h b/tools/build/stddef.h
--- a/tools/build/stddef.h
+++ b/tools/build/stddef.h
@@ -36,14 +36,24 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#pragma once
+
+/*
+ * The header guard is left out on purpose here. Both clang and gcc's
+ * stddef.h are designed to be included multiple times with different
+ * combinations of __need_* macros defined (e.g __need_size_t).
+ */
+
#include_next <stddef.h>
#ifndef _PTRADDR_T_DECLARED
#ifdef __PTRADDR_TYPE__
typedef __PTRADDR_TYPE__ ptraddr_t;
#else
-typedef size_t ptraddr_t;
+/*
+ * If anything other than __need_size_t is defined (see above), we won't
+ * have size_t. Use __SIZE_TYPE__ instead.
+ */
+typedef __SIZE_TYPE__ ptraddr_t;
#endif
#define _PTRADDR_T_DECLARED
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 14, 4:33 PM (8 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28995203
Default Alt Text
D55453.id172632.diff (825 B)
Attached To
Mode
D55453: tools/build/stddef.h: fix stock clang/gcc headers
Attached
Detach File
Event Timeline
Log In to Comment