From: Timo Sirainen Date: Tue, 13 Dec 2022 08:48:12 +0000 (+0200) Subject: lib: Fix static_assert() to compile with C++ X-Git-Tag: 2.4.0~3288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=446607fd41d77ed40249165a61033e72021d32ba;p=thirdparty%2Fdovecot%2Fcore.git lib: Fix static_assert() to compile with C++ It exists in C++11, but it's not a macro. --- diff --git a/src/lib/compat.h b/src/lib/compat.h index 22f82d9879..e211915c5f 100644 --- a/src/lib/compat.h +++ b/src/lib/compat.h @@ -18,7 +18,7 @@ #define __has_extension(x) 0 // Compatibility with non-clang compilers. #endif -#ifndef static_assert /* C23 */ +#if !defined(static_assert) /* C23 */ && !defined(__cplusplus) # define static_assert _Static_assert #endif