[PATCH 09/21] header: add get_random_u32()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was renamed in upstream kernel and changed from unsigned int to u32.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/random.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h
index a9dda73b..7d817d8b 100644
--- a/backport/backport-include/linux/random.h
+++ b/backport/backport-include/linux/random.h
@@ -42,4 +42,11 @@ static inline u32 prandom_u32_max(u32 ep_ro)
 }
 #endif /* LINUX_VERSION_IS_LESS(3,14,0) */
 
+#if LINUX_VERSION_IS_LESS(4,11,0)
+static inline u32 get_random_u32(void)
+{
+	return get_random_int();
+}
+#endif
+
 #endif /* __BACKPORT_RANDOM_H */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux