summaryrefslogtreecommitdiff
path: root/backport/backport-include
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-05-31 15:52:42 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2014-06-02 00:16:18 +0200
commitd787b3dd3b4fcb5f40eb6532163dc3abdca4fd45 (patch)
tree92c51f3e7067ac053b8ba43c50b9272949cfa3a5 /backport/backport-include
parentf9394bb11e68f55ac3073fb40842c989b2cc27f8 (diff)
backports: only add net_get_random_once() when not available
net_get_random_once() was added unconditionally also when the kernel we are compiling against already provided this function, this patch checks that first. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport/backport-include')
-rw-r--r--backport/backport-include/linux/net.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/backport/backport-include/linux/net.h b/backport/backport-include/linux/net.h
index 385f8079..0e436d41 100644
--- a/backport/backport-include/linux/net.h
+++ b/backport/backport-include/linux/net.h
@@ -64,7 +64,7 @@ do { \
* may affect tracing. My recommendation is that if you have a need for
* static keys you just require at least 3.5 to remain sane.
*/
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) && !defined(net_get_random_once)
#define __BACKPORT_NET_GET_RANDOM_ONCE 1
#endif
#endif /* ___NET_RANDOM_STATIC_KEY_INIT */