Merge pull request #62 from barracuda156/static_assert

blisp_struct.h: use _Static_assert for pre-C23 compatibility
This commit is contained in:
Ben V. Brown 2024-12-11 14:32:28 +11:00 committed by GitHub
commit 17f6234a4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,12 @@
#include <assert.h>
#include <stdint.h>
#if !defined(static_assert) && (defined(__GNUC__) || defined(__clang__)) \
&& defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
&& __STDC_VERSION__ <= 201710L
#define static_assert _Static_assert
#endif
#pragma pack(push, 1)
typedef struct {