From: Jesse Gross Date: Wed, 21 Sep 2011 02:12:32 +0000 (-0700) Subject: datapath: Add version check for struct netdev_ops. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bfff3c8b608bf174e2accd39f7c56d8f827bf2b;p=openvswitch 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 --- 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;