Skip to content

Commit

Permalink
gguf-hash: missing stdalign.h in windows bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
mofosyne committed Jul 4, 2024
1 parent d8dd43f commit 50a86a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/gguf-hash/deps/xxhash/xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,13 @@ struct XXH64_state_s {

#ifndef XXH_NO_XXH3

#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */
#if (defined(_MSC_VER) && (_MSC_VER >= 1000) || !defined(_MSC_VER))

/* Windows SDK under 10.0.22000 check is missing stdalign.h so we add a check
before allowing the windows compiler to use the C11 form.
Reference: https://github.com/Cyan4973/xxHash/issues/955 */
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) \
&& (defined(_MSC_VER) && (_MSC_VER >= 1000) || !defined(_MSC_VER)) /* >= C11 */
# include <stdalign.h>
# define XXH_ALIGN(n) alignas(n)
#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */
Expand Down

0 comments on commit 50a86a0

Please sign in to comment.