Skip to content

Commit

Permalink
xxhash: do no longer depend on <assert.h> for XXH_STATIC_ASSERT
Browse files Browse the repository at this point in the history
Cyan4973/xxHash#670

this fixes building borgbackup on FreeBSD 12.x (when using the
bundled xxhash code). otherwise i got "undefined symbol static_assert".
  • Loading branch information
ThomasWaldmann committed Jun 5, 2022
1 parent 4a13cb0 commit 582732e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/borg/algorithms/xxh64/xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 582732e

Please sign in to comment.