From e0ca5576e06e6dd405dcaf0043566172405979c2 Mon Sep 17 00:00:00 2001 From: Jyrki Vesterinen Date: Sat, 17 Dec 2016 15:40:36 +0200 Subject: [PATCH] Attempt to fix a compiler warning with modern Clang --- src/global.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/global.hpp b/src/global.hpp index 26926c58418a..3866b41f4547 100644 --- a/src/global.hpp +++ b/src/global.hpp @@ -81,7 +81,12 @@ #include // To ensure standard library version macros are defined // If it's libc++, no problem. Otherwise, attempt to detect libstdc++ version (needs GCC 5.1 or higher) // by testing for the existence of a header added in that version. -#define HAVE_PUT_TIME (defined(_LIBCPP_VERSION) || __has_include()) +#if defined(_LIBCPP_VERSION) || __has_include() +#define HAVE_PUT_TIME 1 +#else +#define HAVE_PUT_TIME 0 +#endif + // Clang has convenient feature detection macros \o/ #define HAVE_REF_QUALIFIERS __has_feature(cxx_reference_qualified_functions) #define HAVE_INHERITING_CTORS __has_feature(cxx_inheriting_constructors)