From 33257c6439b780c335342ebd285d971c24f69fd7 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Fri, 1 Jan 2021 08:50:13 +0100 Subject: [PATCH] *BSD: protect against incompatible redefinitions of int64_t/uint64_t. --- include/stddef.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/stddef.h b/include/stddef.h index 536ebee3..aff5da35 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -17,12 +17,17 @@ typedef union { long long __ll; long double __ld; } max_align_t; typedef signed char int8_t; typedef signed short int int16_t; typedef signed int int32_t; -typedef signed __INT64_TYPE__ int64_t; typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; +#if defined(__LP64__) \ + && !defined(__FreeBSD__) \ + && !(defined(__NetBSD__) && defined(__aarch64__)) +typedef signed __INT64_TYPE__ int64_t; typedef unsigned __INT64_TYPE__ uint64_t; #endif +#endif +#endif #ifndef NULL #define NULL ((void*)0)