Browse Source

[core] define static_assert for uClibc (fixes #3127)

(thx aeolio)

define static_assert in algo_xxhash.h for uClibc

x-ref:
  "src/algo_xxhash.h: build failure with toolchain using uClibc"
  https://redmine.lighttpd.net/issues/3127
master
Glenn Strauss 5 months ago
parent
commit
a568bf4733
  1. 3
      src/algo_xxhash.h

3
src/algo_xxhash.h

@ -1563,6 +1563,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 <assert.h>
# ifndef static_assert /* uClibc does not define 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)

Loading…
Cancel
Save