diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2022-06-05 14:11:41 +0200 |
---|---|---|
committer | Thomas Waldmann <tw@waldmann-edv.de> | 2022-06-05 14:17:17 +0200 |
commit | 71e9bd22bfab7bc4f44cb62a99748f713a395bf9 (patch) | |
tree | 7baa0dc6730b780be45ea0d399f2cf9ad5ac86a6 | |
parent | f70cf3d59113e2dc842402ffc2d336def41e6b81 (diff) |
xxhash: do no longer depend on <assert.h> for XXH_STATIC_ASSERT
https://github.com/Cyan4973/xxHash/pull/670
this fixes building borgbackup on FreeBSD 12.x (when using the
bundled xxhash code). otherwise i got "undefined symbol static_assert".
-rw-r--r-- | src/borg/algorithms/xxh64/xxhash.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/borg/algorithms/xxh64/xxhash.h b/src/borg/algorithms/xxh64/xxhash.h index 08ab79457..511c4d12b 100644 --- a/src/borg/algorithms/xxh64/xxhash.h +++ b/src/borg/algorithms/xxh64/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 |