0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 754a16eeb255c06dbdd4655632276573f0f075ec Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Mon, 12 Apr 2021 23:44:53 -0700
  4. Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl
  5. musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64
  6. unlike glibc where these are provided by libc headers, therefore define
  7. them here in case they are undefined
  8. Upstream-Status: Pending
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. src/basic/missing_syscall.h | 6 ++++++
  12. src/shared/base-filesystem.c | 1 +
  13. 2 files changed, 7 insertions(+)
  14. diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
  15. index 793d111c55..9665848b88 100644
  16. --- a/src/basic/missing_syscall.h
  17. +++ b/src/basic/missing_syscall.h
  18. @@ -20,6 +20,12 @@
  19. #include <asm/sgidefs.h>
  20. #endif
  21. +#ifndef _MIPS_SIM_ABI32
  22. +#define _MIPS_SIM_ABI32 1
  23. +#define _MIPS_SIM_NABI32 2
  24. +#define _MIPS_SIM_ABI64 3
  25. +#endif
  26. +
  27. #include "macro.h"
  28. #include "missing_keyctl.h"
  29. #include "missing_stat.h"
  30. diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
  31. index d396bc99fe..7e9c0c3412 100644
  32. --- a/src/shared/base-filesystem.c
  33. +++ b/src/shared/base-filesystem.c
  34. @@ -19,6 +19,7 @@
  35. #include "string-util.h"
  36. #include "umask-util.h"
  37. #include "user-util.h"
  38. +#include "missing_syscall.h"
  39. typedef struct BaseFilesystem {
  40. const char *dir; /* directory or symlink to create */