[ovs-dev] [PATCH 1/2] datapath: Add version check for struct netdev_ops.
Jesse Gross
jesse at nicira.com
Tue Oct 18 05:10:52 UTC 2011
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 <jesse at nicira.com>
---
datapath/vport-internal_dev.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
index b503b87..2d46343 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;
--
1.7.5.4
More information about the dev
mailing list