From 89baa72ed8f6ea45e3437b1ae3da007e7318bb3b Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 2 Apr 2015 14:09:03 -0400 Subject: [PATCH] Define __STDC_FORMAT_MACROS before inttypes.h. It seems Android's inttypes.h refuses to define those macros on C++ unless __STDC_FORMAT_MACROS is set. This unbreaks the roll on Android. Change-Id: Iad6c971b4789f0302534d9e5022534c6124e0ff0 Reviewed-on: https://boringssl-review.googlesource.com/4202 Reviewed-by: Adam Langley --- crypto/bn/internal.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crypto/bn/internal.h b/crypto/bn/internal.h index f61b86e5..a239ea25 100644 --- a/crypto/bn/internal.h +++ b/crypto/bn/internal.h @@ -125,6 +125,12 @@ #include +/* Some versions of inttypes.h will not define print macros in C++ unless + * __STDC_FORMAT_MACROS is set. */ +#if !defined(__STDC_FORMAT_MACROS) +#define __STDC_FORMAT_MACROS +#endif + #include #if defined(OPENSSL_X86_64) && defined(_MSC_VER) && _MSC_VER >= 1400