Skip to content

Commit c83b33a

Browse files
committed
Support syscalls on mips64
1 parent e359449 commit c83b33a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sys/syscall.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ mod arch {
4444
pub static MEMFD_CREATE: Syscall = 385;
4545
}
4646

47+
// Rust on mips uses the N32 ABI
4748
#[cfg(target_arch = "mips")]
4849
mod arch {
4950
use libc::c_long;
@@ -54,6 +55,17 @@ mod arch {
5455
pub static MEMFD_CREATE: Syscall = 354;
5556
}
5657

58+
// Rust on mips64 uses the N64 ABI
59+
#[cfg(target_arch = "mips64")]
60+
mod arch {
61+
use libc::c_long;
62+
63+
pub type Syscall = c_long;
64+
65+
pub static SYSPIVOTROOT: Syscall = 151;
66+
pub static MEMFD_CREATE: Syscall = 314;
67+
}
68+
5769
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
5870
mod arch {
5971
use libc::c_long;

0 commit comments

Comments
 (0)