[ovs-dev] [PATCH] datapath: Check for backported rnd_state.
Alexey I. Froloff
raorn at altlinux.org
Fri Sep 17 01:14:42 PDT 2010
Fixes FTBFS on 2.6.18-221.el5 kernel.
Signed-off-by: Alexey I. Froloff <raorn at altlinux.org>
---
acinclude.m4 | 3 +++
datapath/linux-2.6/compat-2.6/random32.c | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index f1322fa..c8be560 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -162,6 +162,9 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [
OVS_GREP_IFELSE([$KSRC26/include/linux/netdevice.h], [dev_get_stats],
[OVS_DEFINE([HAVE_DEV_GET_STATS])])
+ OVS_GREP_IFELSE([$KSRC26/include/linux/random.h], [rnd_state],
+ [OVS_DEFINE([HAVE_RND_STATE])])
+
# Check for the proto_data_valid member in struct sk_buff. The [^@]
# is necessary because some versions of this header remove the
# member but retain the kerneldoc comment that describes it (which
diff --git a/datapath/linux-2.6/compat-2.6/random32.c b/datapath/linux-2.6/compat-2.6/random32.c
index b0dd2a3..3a1dcf3 100644
--- a/datapath/linux-2.6/compat-2.6/random32.c
+++ b/datapath/linux-2.6/compat-2.6/random32.c
@@ -44,9 +44,11 @@
#include "compat26.h"
+#ifndef HAVE_RND_STATE
struct rnd_state {
u32 s1, s2, s3;
};
+#endif
static struct rnd_state net_rand_state[NR_CPUS];
--
1.7.1.1
More information about the dev
mailing list