From 820b11dc0ae315a33bbf0cd2cca91ca592e280a3 Mon Sep 17 00:00:00 2001 From: Joshua Oreman Date: Tue, 31 Mar 2009 07:20:11 +0100 Subject: [build] Use __SIZE_TYPE__ macro in definition of size_t This is required in order to build on Mac OS X. Modified-by: Michael Brown Signed-off-by: Michael Brown --- src/include/stdint.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/include') diff --git a/src/include/stdint.h b/src/include/stdint.h index 4b0e44f2e..dc4bd8c76 100644 --- a/src/include/stdint.h +++ b/src/include/stdint.h @@ -1,6 +1,16 @@ #ifndef _STDINT_H #define _STDINT_H +/* + * This is a standard predefined macro on all gcc's I've seen. It's + * important that we define size_t in the same way as the compiler, + * because that's what it's expecting when it checks %zd/%zx printf + * format specifiers. + */ +#ifndef __SIZE_TYPE__ +#define __SIZE_TYPE__ unsigned long /* safe choice on most systems */ +#endif + #include typedef int8_t s8; -- cgit v1.2.3-55-g7522