diff --git a/CMakeLists.txt b/CMakeLists.txt index 8be234c49..8ce55eff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,7 @@ endif() set(JUDY_LIBRARIES "Judy") # Standard FLAGS -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") if(NOT APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") endif() diff --git a/src/if-netmap-linux.c b/src/if-netmap-linux.c index fe563293d..2965e0da8 100644 --- a/src/if-netmap-linux.c +++ b/src/if-netmap-linux.c @@ -94,7 +94,7 @@ fetch_stats64(struct rtnl_link_stats64 *rtlstats64, char const *ifname, int nlrt } err; } u; } nlresp; - _Static_assert(sizeof(nlresp.u.ans) >= sizeof(nlresp.u.err)); + static_assert(sizeof(nlresp.u.ans) >= sizeof(nlresp.u.err), "ans is at least as large as err"); static const size_t ans_size = offsetof(struct nlresp, u.ans) + sizeof(nlresp.u.ans); static const size_t err_size = offsetof(struct nlresp, u.err) + sizeof(nlresp.u.err);