X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Flinux%2Fkernel.h;h=069839bdbe3e4041caa99a98eaa96394d88329a0;hb=51f4701be1545a3faa288dfe3993221a6a2fd81c;hp=812f2132978e892eca744dea926cbe1bbb55e7a0;hpb=1280bf0e51e963dd3de6ee1e530bd4d7ce376591;p=openvswitch diff --git a/datapath/linux/compat/include/linux/kernel.h b/datapath/linux/compat/include/linux/kernel.h index 812f2132..069839bd 100644 --- a/datapath/linux/compat/include/linux/kernel.h +++ b/datapath/linux/compat/include/linux/kernel.h @@ -7,7 +7,11 @@ #endif #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) +/* BUILD_BUG_ON_NOT_POWER_OF_2 definition */ #include +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) #undef pr_emerg #define pr_emerg(fmt, ...) \ @@ -39,12 +43,6 @@ #define pr_warn pr_warning #endif -#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 - #if defined(CONFIG_PREEMPT) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21) #error "CONFIG_PREEMPT is broken before 2.6.21--see commit 4498121ca3, \"[NET]: Handle disabled preemption in gfp_any()\"" #endif