summaryrefslogtreecommitdiff
path: root/src/shared/missing.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-22 12:04:50 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-22 12:04:53 -0500
commit568981d2ac78567e859d89e8d29f844c3e6a871f (patch)
tree42ee9d735438c03e8486965a1a3e97d007cbccbe /src/shared/missing.h
parent1e648011b20c8126412d3cf2699d575d9ba9e0fe (diff)
missing: add __NR_getrandom for a few more archs
Mips has getrandom() too, but there's just too many variants for me too care. Either someone who cares does it, or they get compile-time warnings with old kernel headers.
Diffstat (limited to 'src/shared/missing.h')
-rw-r--r--src/shared/missing.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index ecd32babed..8c6698cff1 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -149,6 +149,16 @@ static inline int memfd_create(const char *name, unsigned int flags) {
#ifndef __NR_getrandom
# if defined __x86_64__
# define __NR_getrandom 318
+# elif defined(__i386__)
+# define __NR_getrandom 355
+# elif defined(__arm__) || defined(__aarch64__)
+# define __NR_getrandom 384
+# elif defined(__ia64__)
+# define __NR_getrandom 1339
+# elif defined(__m68k__)
+# define __NR_getrandom 352
+# elif defined(__s390x__)
+# define __NR_getrandom 349
# else
# warning "__NR_getrandom unknown for your architecture"
# define __NR_getrandom 0xffffffff