Skip to content

Commit af1f9f9

Browse files
Add support for loongarch64
1 parent 5dedbc7 commit af1f9f9

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Tier 1:
6262
* x86_64-unknown-freebsd
6363
* x86_64-unknown-linux-gnu
6464
* x86_64-unknown-linux-musl
65+
* loongarch64-unknown-linux-gnu
6566

6667
Tier 2:
6768
* aarch64-apple-darwin

src/sys/ioctl/linux.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ mod consts {
3535
target_arch = "x86_64",
3636
target_arch = "aarch64",
3737
target_arch = "riscv32",
38-
target_arch = "riscv64"))]
38+
target_arch = "riscv64",
39+
target_arch = "loongarch64"))]
3940
mod consts {
4041
#[doc(hidden)]
4142
pub const NONE: u8 = 0;

src/sys/signal.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ libc_enum!{
6262
#[cfg(all(any(target_os = "android", target_os = "emscripten",
6363
target_os = "fuchsia", target_os = "linux"),
6464
not(any(target_arch = "mips", target_arch = "mips64",
65-
target_arch = "sparc64"))))]
65+
target_arch = "sparc64",
66+
target_arch = "loongarch64"))))]
6667
SIGSTKFLT,
6768
/// To parent on child stop or exit
6869
SIGCHLD,
@@ -138,7 +139,8 @@ impl FromStr for Signal {
138139
#[cfg(all(any(target_os = "android", target_os = "emscripten",
139140
target_os = "fuchsia", target_os = "linux"),
140141
not(any(target_arch = "mips", target_arch = "mips64",
141-
target_arch = "sparc64"))))]
142+
target_arch = "sparc64",
143+
target_arch = "loongarch64"))))]
142144
"SIGSTKFLT" => Signal::SIGSTKFLT,
143145
"SIGCHLD" => Signal::SIGCHLD,
144146
"SIGCONT" => Signal::SIGCONT,
@@ -197,7 +199,9 @@ impl Signal {
197199
Signal::SIGTERM => "SIGTERM",
198200
#[cfg(all(any(target_os = "android", target_os = "emscripten",
199201
target_os = "fuchsia", target_os = "linux"),
200-
not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64"))))]
202+
not(any(target_arch = "mips", target_arch = "mips64",
203+
target_arch = "sparc64",
204+
target_arch = "loongarch64"))))]
201205
Signal::SIGSTKFLT => "SIGSTKFLT",
202206
Signal::SIGCHLD => "SIGCHLD",
203207
Signal::SIGCONT => "SIGCONT",
@@ -312,7 +316,8 @@ const SIGNALS: [Signal; 28] = [
312316
#[cfg(all(any(target_os = "linux", target_os = "android",
313317
target_os = "emscripten", target_os = "fuchsia"),
314318
not(any(target_arch = "mips", target_arch = "mips64",
315-
target_arch = "sparc64"))))]
319+
target_arch = "sparc64",
320+
target_arch = "loongarch64"))))]
316321
#[cfg(feature = "signal")]
317322
const SIGNALS: [Signal; 31] = [
318323
SIGHUP,

0 commit comments

Comments
 (0)