From d13fa3bd3eb4953a587c6d5daf5252063e3dad18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Fri, 22 Mar 2024 14:40:31 -0400
Subject: [PATCH] Use static_assert() macro instead of _Static_assert keyword

More compatible with C++ that way.
---
 src/xpdev/gen_defs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xpdev/gen_defs.h b/src/xpdev/gen_defs.h
index d49f4f73ff..ab51334ea1 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
-- 
GitLab