chiark / gitweb /
systemd: add getrandom syscall numbers for MIPS
authorAaro Koskinen <aaro.koskinen@nokia.com>
Mon, 23 Feb 2015 14:01:31 +0000 (16:01 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 25 Feb 2015 04:51:58 +0000 (23:51 -0500)
Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel
(commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new
syscalls getrandom and memfd_create").

src/shared/missing.h

index b33a70cb2cc7ba5134c7384db0477c9b76f44a90..e72631e130d997652bfbd1e79e9f05b7d80dd467 100644 (file)
@@ -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