@@ -798,6 +798,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_FIND_PARAM_IFELSE([$KSRC/include/linux/netdevice.h],
[netdev_master_upper_dev_link], [extack],
[OVS_DEFINE([HAVE_UPPER_DEV_LINK_EXTACK])])
+ OVS_GREP_IFELSE([$KSRC/include/linux/compiler_types.h],
+ [__LINUX_COMPILER_TYPES_H],
+ [OVS_DEFINE([HAVE_LINUX_COMPILER_TYPES_H])])
if cmp -s datapath/linux/kcompat.h.new \
datapath/linux/kcompat.h >/dev/null 2>&1; then
@@ -1,6 +1,8 @@
#ifndef __LINUX_COMPILER_H
+#ifndef HAVE_LINUX_COMPILER_TYPES_H
#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
#endif
+#endif
#include_next <linux/compiler-gcc.h>
Since Linux kernel upstream commit d15155824c50 ("linux/compiler.h: Split into compiler.h and compiler_types.h") this error check for the gcc compiler header is no longer valid. Remove so that openvswitch builds for linux kernels 4.14.8 and since. Signed-off-by: Greg Rose <gvrose8192@gmail.com> --- acinclude.m4 | 3 +++ datapath/linux/compat/include/linux/compiler-gcc.h | 2 ++ 2 files changed, 5 insertions(+)