diff mbox

[09/21] header: add get_random_u32()

Message ID 20170821222817.17376-10-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show

Commit Message

Hauke Mehrtens Aug. 21, 2017, 10:28 p.m. UTC
This was renamed in upstream kernel and changed from unsigned int to u32.

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

Patch

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 */