]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Work around incomplete C11 support in Microsoft's stddef.h
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 7 Mar 2024 19:27:14 +0000 (05:27 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 7 Mar 2024 19:27:14 +0000 (05:27 +1000)
Closes https://github.com/DarkPlacesEngine/darkplaces/issues/126

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
zone.h

diff --git a/zone.h b/zone.h
index 42644a1927115ca7690e730d91d84a12c46894c8..2225ec7c7f47ea9275a9ad72b2f85a2d14dbfeb8 100644 (file)
--- a/zone.h
+++ b/zone.h
@@ -27,6 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "qdefs.h"
 #include "com_list.h"
 
+// Work around incomplete C11 support in Microsoft's stddef.h
+// This matches the Clang 14 header. Microsoft's double and long double are the same.
+#if defined(_MSC_VER)
+       typedef double max_align_t;
+#endif
+
 extern qbool mem_bigendian;
 
 // div0: heap overflow detection paranoia