Fix build on Linux 2.6.26.
authorBen Pfaff <blp@nicira.com>
Sat, 19 Jul 2008 23:14:18 +0000 (16:14 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 19 Jul 2008 23:14:18 +0000 (16:14 -0700)
Linux 2.6.26 requires us to additionally include <linux/rculist.h>
to use RCU lists.

datapath/datapath.c
datapath/hwtable_dummy/hwtable_dummy.c
datapath/linux-2.4/compat-2.4/include/linux/rculist.h [new file with mode: 0644]
datapath/linux-2.6/compat-2.6/include/linux/rculist.h [new file with mode: 0644]
datapath/table-linear.c

index a4c6a2de80c7510906703535ea16e452bc38d933..147b7aa40b784b29abc4e5b829eb28f6608efd95 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/netfilter_bridge.h>
 #include <linux/inetdevice.h>
 #include <linux/list.h>
+#include <linux/rculist.h>
 
 #include "openflow-netlink.h"
 #include "datapath.h"
index d84dde0ca152819ec132f19824b3e9b3635a77ab..b6c5832b5a0137baf1472eecba3bdf3d9730b6e5 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
 #include <linux/list.h>
+#include <linux/rculist.h>
 #include <linux/delay.h>
 #include <linux/if_arp.h>
 
diff --git a/datapath/linux-2.4/compat-2.4/include/linux/rculist.h b/datapath/linux-2.4/compat-2.4/include/linux/rculist.h
new file mode 100644 (file)
index 0000000..c7a69f9
--- /dev/null
@@ -0,0 +1,2 @@
+/* In Linux 2.6.26, part of list.h was broken out into rculist.h. */
+#include <linux/list.h>
diff --git a/datapath/linux-2.6/compat-2.6/include/linux/rculist.h b/datapath/linux-2.6/compat-2.6/include/linux/rculist.h
new file mode 100644 (file)
index 0000000..4164c0e
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef __LINUX_RCULIST_WRAPPER_H
+#define __LINUX_RCULIST_WRAPPER_H
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include_next <linux/rculist.h>
+#else
+/* Prior to 2.6.26, the contents of rculist.h were part of list.h. */
+#include <linux/list.h>
+#endif
+
+#endif
index 68c3aed11ad99229597f87b85b4af22651043ad8..8094838711a6a9e59d1a8c0ba427a1b89e8c1949 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
-#include <linux/list.h>
+#include <linux/rculist.h>
 
 struct sw_table_linear {
        struct sw_table swt;