summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2015-02-23 16:01:31 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-02-24 23:51:58 -0500
commit3bec6d4690d2a7f08dc27b8221299c1db94978c4 (patch)
tree8e3828714c3878fa2d41034e01b4d47e05bf12f0 /src
parentc1682f17a0c966988e865c649e565dae41abf32d (diff)
systemd: add getrandom syscall numbers for MIPS
Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel (commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new syscalls getrandom and memfd_create").
Diffstat (limited to 'src')
-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 b33a70cb2c..e72631e130 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -179,6 +179,16 @@ static inline int memfd_create(const char *name, unsigned int flags) {
# define __NR_getrandom 349
# elif defined(__powerpc__)
# define __NR_getrandom 359
+# elif defined _MIPS_SIM
+# if _MIPS_SIM == _MIPS_SIM_ABI32
+# define __NR_getrandom 4353
+# endif
+# if _MIPS_SIM == _MIPS_SIM_NABI32
+# define __NR_getrandom 6317
+# endif
+# if _MIPS_SIM == _MIPS_SIM_ABI64
+# define __NR_getrandom 5313
+# endif
# else
# warning "__NR_getrandom unknown for your architecture"
# define __NR_getrandom 0xffffffff