summaryrefslogtreecommitdiffstats
path: root/backport-include/linux/random.h
diff options
context:
space:
mode:
authorroot <root@artemis.panaceas.org>2015-12-25 15:00:15 +0000
committerroot <root@artemis.panaceas.org>2015-12-25 15:00:15 +0000
commitddd86436f4e3643c04b797f858dab95d5f2e4de9 (patch)
treebfe7a780cf9a2f4fc33aec32c82e625e79dece1f /backport-include/linux/random.h
downloadbackports-3.10.19-1-ddd86436f4e3643c04b797f858dab95d5f2e4de9.tar.gz
backports-3.10.19-1-ddd86436f4e3643c04b797f858dab95d5f2e4de9.tar.bz2
backports-3.10.19-1-ddd86436f4e3643c04b797f858dab95d5f2e4de9.zip
Diffstat (limited to 'backport-include/linux/random.h')
-rw-r--r--backport-include/linux/random.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/backport-include/linux/random.h b/backport-include/linux/random.h
new file mode 100644
index 0000000..812ce7f
--- /dev/null
+++ b/backport-include/linux/random.h
@@ -0,0 +1,13 @@
+#ifndef __BACKPORT_RANDOM_H
+#define __BACKPORT_RANDOM_H
+#include_next <linux/random.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+/* backports 496f2f9 */
+#define prandom_seed(_seed) srandom32(_seed)
+#define prandom_u32() random32()
+#define prandom_u32_state(_state) prandom32(_state)
+#endif
+
+#endif /* __BACKPORT_RANDOM_H */