blob: 19dab7cac6a97bce4c4afc29b2074371cb3552c9 [file] [log] [blame]
From e4f825dd9e952f4a056bf89342049e67102ae6bb Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <thomas.devoogdt@barco.com>
Date: Wed, 1 Feb 2023 11:38:15 +0100
Subject: [PATCH] lib: cfl: fixup static_assert
"undefined reference to 'static_assert'"
Not defined when using uClibc or if not C++ >= 11.
upstream: https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
lib/cfl/lib/xxhash/xxhash.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/cfl/lib/xxhash/xxhash.h b/lib/cfl/lib/xxhash/xxhash.h
index 08ab79457..511c4d12b 100644
--- a/lib/cfl/lib/xxhash/xxhash.h
+++ b/lib/cfl/lib/xxhash/xxhash.h
@@ -1546,8 +1546,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
/* note: use after variable declarations */
#ifndef XXH_STATIC_ASSERT
# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
-# include <assert.h>
-# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
+# 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)
# else
--
2.34.1