macros: add static assert helper

So that we can use this from gnu99 such as from GTK.
This commit is contained in:
Christian Hergert
2020-07-04 16:11:31 -07:00
parent 50d33452ab
commit 57183ab8e2
4 changed files with 30 additions and 25 deletions

View File

@ -55,7 +55,7 @@ typedef struct _MappedRingHeader
uint32_t size;
} MappedRingHeader;
static_assert (sizeof (MappedRingHeader) == 16, "MappedRingHeader changed size");
SYSPROF_STATIC_ASSERT (sizeof (MappedRingHeader) == 16, "MappedRingHeader changed size");
/*
* MappedRingBuffer is used to wrap both the reader and writer