diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-12-09 17:52:48 -0800 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-12-09 17:52:48 -0800 |
commit | b38155311b8cf49e2f06b239c5e04e98090b0e99 (patch) | |
tree | d1c264564bbbd7f07e22e6e54f890e83eb662713 /datapath | |
parent | ba63fe260bd5968f480b43db5db9630dea62a640 (diff) | |
download | openvswitch-b38155311b8cf49e2f06b239c5e04e98090b0e99.tar.gz |
datapath: Fix compile time assertion.
compiletime_assert() cannot be used in file scope, so use preprocessor
directives instead.
Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/include/linux/genetlink.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/datapath/linux/compat/include/linux/genetlink.h b/datapath/linux/compat/include/linux/genetlink.h index 909f62a16..3b85f3865 100644 --- a/datapath/linux/compat/include/linux/genetlink.h +++ b/datapath/linux/compat/include/linux/genetlink.h @@ -8,7 +8,9 @@ #endif #ifdef GENL_ID_GENERATE -compiletime_assert(GENL_ID_GENERATE == 0, "GENL_ID_GENERATE is assumed to be zero") +#if GENL_ID_GENERATE != 0 +#error "GENL_ID_GENERATE is assumed to be zero" +#endif #endif #endif |