From: Pravin B Shelar Date: Mon, 5 Nov 2012 23:12:59 +0000 (-0800) Subject: datapath: Add missing bug.h file X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e5877ecdacf66905afd2481d0025d3fd7d9132f;p=openvswitch datapath: Add missing bug.h file Commit 51f4701be1 (datapath: Fix sparse warning for symbol 'BUILD_BUG_ON_NOT_POWER_OF_2') missed file bug.h. Commiting it now. Signed-off-by: Pravin B Shelar --- diff --git a/datapath/linux/compat/include/linux/bug.h b/datapath/linux/compat/include/linux/bug.h new file mode 100644 index 00000000..d24e68e3 --- /dev/null +++ b/datapath/linux/compat/include/linux/bug.h @@ -0,0 +1,12 @@ +#ifndef __BUG_H_WRAPPER +#define __BUG_H_WRAPPER 1 + +#include_next + +#ifndef BUILD_BUG_ON_NOT_POWER_OF_2 +/* Force a compilation error if a constant expression is not a power of 2 */ +#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ + BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) +#endif + +#endif