From 834994a075da397c581499ce41662d2f9d878ef2 Mon Sep 17 00:00:00 2001 From: Clifford Yapp <238416+starseeker@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:45:04 -0400 Subject: [PATCH] Define static assert for Ghost BSD Similar to https://github.com/apache/mynewt-core/issues/2040#issuecomment-554571476 --- include/xxhash.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/xxhash.h b/include/xxhash.h index 1c92d78f5a0..826824ceb67 100644 --- a/include/xxhash.h +++ b/include/xxhash.h @@ -1547,6 +1547,9 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) #ifndef XXH_STATIC_ASSERT # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ # include +# if !defined(__cplusplus) && !defined(static_assert) +# define static_assert _Static_assert +# endif # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) # elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)