From: Hauke Mehrtens Date: Sat, 31 May 2014 13:52:42 +0000 (+0200) Subject: backports: only add net_get_random_once() when not available X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d787b3dd3b4fcb5f40eb6532163dc3abdca4fd45;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/backport/backport-include/linux/net.h b/backport/backport-include/linux/net.h index 385f807967cb..0e436d41f9f6 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 */