diff --git a/src/xpdev/gen_defs.h b/src/xpdev/gen_defs.h index d49f4f73ffa62ea70313279a7947b92f9413ea26..ab51334ea1ebe3fd9f77fa46d6c35d3323f29ba7 100644 --- a/src/xpdev/gen_defs.h +++ b/src/xpdev/gen_defs.h @@ -432,7 +432,7 @@ typedef struct { /* This is a bound-safe version of strcpy basically - only works with fixed-length arrays */ #ifdef _DEBUG #define SAFECOPY(dst,src) do { \ - _Static_assert(sizeof(dst) != sizeof(void*), "SAFECOPY() on pointer-sized dst, use strlcpy"); \ + static_assert(sizeof(dst) != sizeof(void*), "SAFECOPY() on pointer-sized dst, use strlcpy"); \ strlcpy(dst,src,sizeof(dst)); \ } while(0) #else @@ -442,7 +442,7 @@ typedef struct { /* Extra-safe SAFECOPY doesn't pass NULL-pointer to strncpy */ #ifdef _DEBUG #define XSAFECOPY(dst,src) do { \ - _Static_assert(sizeof(dst) != sizeof(void*), "SAFECOPY() on pointer-sized dst, use strlcpy"); \ + static_assert(sizeof(dst) != sizeof(void*), "SAFECOPY() on pointer-sized dst, use strlcpy"); \ strlcpy(dst,(src)==NULL?"(null)":(src),sizeof(dst)); \ } while(0) #else