diff --git a/thirdparty/sdd.c b/thirdparty/sdd.c index 1ac6e6b..9859258 100644 --- a/thirdparty/sdd.c +++ b/thirdparty/sdd.c @@ -51,7 +51,7 @@ typedef struct sdd { #define SDD_HDR(s) ((sdd_header *)s - 1) -#if defined(__GNUC__) || defined(__clang__) +#if (defined(__GNUC__) || defined(__clang__)) && defined(__has_attribute) #if __has_attribute(noinline) && __has_attribute(noclone) #define SDD_NOINLINE __attribute__((noinline, noclone)) #elif __has_attribute(noinline) diff --git a/thirdparty/sdd.h b/thirdparty/sdd.h index bd19b1c..1195d0a 100644 --- a/thirdparty/sdd.h +++ b/thirdparty/sdd.h @@ -2,7 +2,7 @@ #include #include -#ifdef __GNUC__ +#if (defined(__GNUC__) || defined(__clang__)) && defined(__has_attribute) #if __has_attribute(format) #define SDD_PRINTF(n1, n2) __attribute__((format(printf, n1, n2))) #endif