Make use of static_assert conditional on whether it's available.
This commit is contained in:
@@ -46,6 +46,9 @@
|
||||
#include "rights.h"
|
||||
#include "str.h"
|
||||
|
||||
// static_assert is not defined in older compilers.
|
||||
#ifdef static_assert
|
||||
|
||||
// struct iovec must have the same layout as __wasi_iovec_t.
|
||||
static_assert(offsetof(struct iovec, iov_base) ==
|
||||
offsetof(__wasi_iovec_t, buf),
|
||||
@@ -78,6 +81,8 @@ static_assert(sizeof(((struct iovec *)0)->iov_len) ==
|
||||
static_assert(sizeof(struct iovec) == sizeof(__wasi_ciovec_t),
|
||||
"Size mismatch");
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WASMTIME_SSP_STATIC_CURFDS)
|
||||
static __thread struct fd_table *curfds;
|
||||
static __thread struct fd_prestats *prestats;
|
||||
|
||||
Reference in New Issue
Block a user