From 4bfff3c8b608bf174e2accd39f7c56d8f827bf2b Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Tue, 20 Sep 2011 19:12:32 -0700 Subject: [PATCH] datapath: Add version check for struct netdev_ops. Linux 3.1 drops the symbol HAVE_NET_DEVICE_OPS that lets us know whether struct netdev_ops is present. As a result, we need to replace it with an explicit version check. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/vport-internal_dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index b503b877..2d463432 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -22,6 +22,10 @@ #include "vport-internal_dev.h" #include "vport-netdev.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) +#define HAVE_NET_DEVICE_OPS +#endif + struct internal_dev { struct vport *vport; struct net_device_stats stats; -- 2.30.2