From: Vicente Olivert Riera Date: Mon, 3 Nov 2014 14:48:35 +0000 (+0000) Subject: Properly define the __NR_memfd_create macro for MIPS X-Git-Tag: v218~575 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=e6c019026b8cfd27a997e6e6ed1349f8f289b7e2;hp=31cf921abbeafc9dae2d5c777f3e2285e6f4c19d Properly define the __NR_memfd_create macro for MIPS This macro exists for MIPS since v3.17: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=42944521af97a3b25516f15f3149aec3779656dc --- diff --git a/src/shared/missing.h b/src/shared/missing.h index cc81c9882..ecd32babe 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -126,8 +126,15 @@ static inline int pivot_root(const char *new_root, const char *put_old) { # elif defined __arm__ # define __NR_memfd_create 385 # elif defined _MIPS_SIM -# warning "__NR_memfd_create not yet defined for MIPS" -# define __NR_memfd_create 0xffffffff +# if _MIPS_SIM == _MIPS_SIM_ABI32 +# define __NR_memfd_create 4354 +# endif +# if _MIPS_SIM == _MIPS_SIM_NABI32 +# define __NR_memfd_create 6318 +# endif +# if _MIPS_SIM == _MIPS_SIM_ABI64 +# define __NR_memfd_create 5314 +# endif # else # define __NR_memfd_create 356 # endif