blob: e112766a9b91d462eb306c04659dfb20c0cbb569 [file] [log] [blame]
Patrick Williams03514f12024-04-05 07:04:11 -05001From 3dc9d9d410bcce54fddfd94f43f7f77f3aa8e281 Mon Sep 17 00:00:00 2001
Patrick Williamsda295312023-12-05 16:48:56 -06002From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 12 Apr 2021 23:44:53 -0700
Patrick Williams03514f12024-04-05 07:04:11 -05004Subject: [PATCH 15/22] missing_syscall.h: Define MIPS ABI defines for musl
Patrick Williamsda295312023-12-05 16:48:56 -06005
6musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64
7unlike glibc where these are provided by libc headers, therefore define
8them here in case they are undefined
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/basic/missing_syscall.h | 6 ++++++
15 src/shared/base-filesystem.c | 1 +
16 2 files changed, 7 insertions(+)
17
18diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
Patrick Williams03514f12024-04-05 07:04:11 -050019index d795efd8f2..d6729d3c1d 100644
Patrick Williamsda295312023-12-05 16:48:56 -060020--- a/src/basic/missing_syscall.h
21+++ b/src/basic/missing_syscall.h
22@@ -20,6 +20,12 @@
23 #include <asm/sgidefs.h>
24 #endif
25
26+#ifndef _MIPS_SIM_ABI32
27+#define _MIPS_SIM_ABI32 1
28+#define _MIPS_SIM_NABI32 2
29+#define _MIPS_SIM_ABI64 3
30+#endif
31+
32 #include "macro.h"
33 #include "missing_keyctl.h"
34 #include "missing_stat.h"
35diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
Patrick Williams03514f12024-04-05 07:04:11 -050036index 7ae921a113..0ef9d1fd39 100644
Patrick Williamsda295312023-12-05 16:48:56 -060037--- a/src/shared/base-filesystem.c
38+++ b/src/shared/base-filesystem.c
39@@ -20,6 +20,7 @@
40 #include "string-util.h"
41 #include "umask-util.h"
42 #include "user-util.h"
43+#include "missing_syscall.h"
44
45 typedef struct BaseFilesystem {
46 const char *dir; /* directory or symlink to create */
47--
Patrick Williams03514f12024-04-05 07:04:11 -0500482.34.1
Patrick Williamsda295312023-12-05 16:48:56 -060049