xxhash_cpp icon indicating copy to clipboard operation
xxhash_cpp copied to clipboard

PR 41 breaks compilation on non intel platforms

Open peter-urban opened this issue 1 year ago • 0 comments

https://github.com/RedSpah/xxhash_cpp/pull/41 adds _MM_PERM_ENUM casts which are only defined on x86_64 bit machines. This breaks compiling the code on any arm architecture (e.g. apple M1).

Is it possible to add architecture guards to avoid this problem?

As a workaround I defined _MM_PERM_ENUM as int for non x86 platforms before including xxhash. This may be a viable solution for xxhash itself as well; but I do not know if my include guard catches all architectures cases correctly ..

#if defined(__x86_64__) || defined(_M_X64)
#else
#define _MM_PERM_ENUM int
#endif
#include <xxhash.hpp>

peter-urban avatar Jan 06 '25 12:01 peter-urban