From 543575ebc88cb9771eed34c66036abf978fffbe6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 21 May 2020 16:30:18 -0600 Subject: compat: widen breadth of memzero_explicit backport Signed-off-by: Jason A. Donenfeld --- src/compat/compat.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/compat/compat.h') diff --git a/src/compat/compat.h b/src/compat/compat.h index 1716311..931f35b 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -273,9 +273,7 @@ static inline u32 __compat_prandom_u32_max(u32 ep_ro) #endif #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 60) && !defined(ISRHEL7) -/* Making this static may very well invalidate its usefulness, - * but so it goes with compat code. */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 3) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 35) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 24) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) && !defined(ISUBUNTU1404)) || (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 33) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 60) && !defined(ISRHEL7)) static inline void memzero_explicit(void *s, size_t count) { memset(s, 0, count); -- cgit v1.2.3