From 9be74e71213ab2a8d449d1cc6cfa4d533fce0d0f Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 30 May 2013 18:11:08 +0200 Subject: ring: prepare setup_rx_ring_layout for support in v2/v3 Prepare setup_rx_ring_layout for both, v2 and v3. Also do some checks during compile time if offsets stay the same as we operate on different union mappings. Signed-off-by: Daniel Borkmann --- built_in.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'built_in.h') diff --git a/built_in.h b/built_in.h index fa2f0c8..ea81257 100644 --- a/built_in.h +++ b/built_in.h @@ -153,6 +153,10 @@ typedef uint8_t u8; # define build_bug_on_zero(e) (sizeof(char[1 - 2 * !!(e)]) - 1) #endif +#ifndef build_bug_on +# define build_bug_on(e) ((void)sizeof(char[1 - 2*!!(e)])) +#endif + #ifndef bug_on # define bug_on(cond) assert(!(cond)) #endif -- cgit v1.2.3-54-g00ecf