From 2af6b901ba20bcbf03a133995b10e4492818948a Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 10 Dec 2017 03:51:25 +0100 Subject: [PATCH] util: define `static_assert` even if clang pretends to be msvc --- src/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.h b/src/util.h index e210b3a..2715803 100644 --- a/src/util.h +++ b/src/util.h @@ -31,7 +31,7 @@ typedef intptr_t ssize_t; #define inline __inline #endif -#if !defined(static_assert) && !defined(_MSC_VER) +#if (defined(__clang__) || defined(__GNUC__)) && !defined(static_assert) /* Polyfill `static_assert` for some versions of clang and gcc. */ #define static_assert(condition, message) typedef __attribute__( \ (__unused__)) int __static_assert_##__LINE__[(condition) ? 1 : -1];