|
|
923a60 |
From 32213f2f1d98bf851a570ecc35c018001e5d5ac4 Mon Sep 17 00:00:00 2001
|
|
|
923a60 |
From: Aaro Koskinen <aaro.koskinen@nokia.com>
|
|
|
923a60 |
Date: Mon, 23 Feb 2015 16:01:31 +0200
|
|
|
923a60 |
Subject: [PATCH] systemd: add getrandom syscall numbers for MIPS
|
|
|
923a60 |
|
|
|
923a60 |
Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel
|
|
|
923a60 |
(commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new
|
|
|
923a60 |
syscalls getrandom and memfd_create").
|
|
|
923a60 |
|
|
|
923a60 |
(cherry picked from commit 3bec6d4690d2a7f08dc27b8221299c1db94978c4)
|
|
|
923a60 |
---
|
|
|
923a60 |
src/shared/missing.h | 10 ++++++++++
|
|
|
923a60 |
1 file changed, 10 insertions(+)
|
|
|
923a60 |
|
|
|
923a60 |
diff --git a/src/shared/missing.h b/src/shared/missing.h
|
|
|
923a60 |
index 06a55769a4..8cb0b2c96e 100644
|
|
|
923a60 |
--- a/src/shared/missing.h
|
|
|
923a60 |
+++ b/src/shared/missing.h
|
|
|
923a60 |
@@ -243,6 +243,16 @@ static inline int memfd_create(const char *name, unsigned int flags) {
|
|
|
923a60 |
# define __NR_getrandom 349
|
|
|
923a60 |
# elif defined(__powerpc__)
|
|
|
923a60 |
# define __NR_getrandom 359
|
|
|
923a60 |
+# elif defined _MIPS_SIM
|
|
|
923a60 |
+# if _MIPS_SIM == _MIPS_SIM_ABI32
|
|
|
923a60 |
+# define __NR_getrandom 4353
|
|
|
923a60 |
+# endif
|
|
|
923a60 |
+# if _MIPS_SIM == _MIPS_SIM_NABI32
|
|
|
923a60 |
+# define __NR_getrandom 6317
|
|
|
923a60 |
+# endif
|
|
|
923a60 |
+# if _MIPS_SIM == _MIPS_SIM_ABI64
|
|
|
923a60 |
+# define __NR_getrandom 5313
|
|
|
923a60 |
+# endif
|
|
|
923a60 |
# else
|
|
|
923a60 |
# warning "__NR_getrandom unknown for your architecture"
|
|
|
923a60 |
# define __NR_getrandom 0xffffffff
|