From 9365455c78cb66c8115d889e73afe0defd7bd670 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 15 Feb 2024 08:56:03 -0500 Subject: zstd: Fix compilation with Oracle Studio compiler on Solaris The compiler does not have ``, but does have `_Alignof`: * https://docs.oracle.com/cd/E77782_01/html/E77788/gnxfh.html#OSSCGgnyfx --- Utilities/cmzstd/lib/common/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/cmzstd/lib/common/compiler.h b/Utilities/cmzstd/lib/common/compiler.h index 73f8d01..d07e189 100644 --- a/Utilities/cmzstd/lib/common/compiler.h +++ b/Utilities/cmzstd/lib/common/compiler.h @@ -265,6 +265,10 @@ * due to a limitation in the kernel source generator */ # define ZSTD_ALIGNOF(T) __alignof(T) +# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +/* Oracle Studio */ +# define ZSTD_ALIGNOF(T) _Alignof(T) + # elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 support */ # include -- cgit v0.12