[systemd-devel] [PATCH] Properly define the __NR_memfd_create macro for MIPS

David Herrmann dh.herrmann at gmail.com
Mon Nov 3 09:08:23 PST 2014


Hi

On Mon, Nov 3, 2014 at 3:48 PM, Vicente Olivert Riera
<Vincent.Riera at imgtec.com> wrote:
> This macro exists for MIPS since v3.17:
>   https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=42944521af97a3b25516f15f3149aec3779656dc
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com>

No s-o-b needed. I dropped it.

Applied!

Thanks
David

> ---
>  src/shared/missing.h |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/shared/missing.h b/src/shared/missing.h
> index 0d7c559..cccab46 100644
> --- a/src/shared/missing.h
> +++ b/src/shared/missing.h
> @@ -125,8 +125,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
> --
> 1.7.1
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list