common.h: define static_assert to _Static_assert when undefined

This commit is contained in:
Sergey Fedorov
2026-01-14 13:41:38 +08:00
committed by Christoffer Lerno
parent 87fa253059
commit 7136b05019

View File

@@ -75,6 +75,10 @@
#define __unused
#endif
#ifndef static_assert
#define static_assert _Static_assert
#endif
#if (defined(__GNUC__) && __GNUC__ >= 7) || defined(__clang__)
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))