Skip to content

Commit 50a86a0

Browse files
committed
gguf-hash: missing stdalign.h in windows bypass
1 parent d8dd43f commit 50a86a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/gguf-hash/deps/xxhash/xxhash.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,13 @@ struct XXH64_state_s {
16871687

16881688
#ifndef XXH_NO_XXH3
16891689

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

0 commit comments

Comments
 (0)