Skip to content

Commit 41ec401

Browse files
bors[bot]kraj
andauthored
Merge #1669
1669: Fix complation on riscv32 r=asomers a=kraj Signed-off-by: Khem Raj <[email protected]> Co-authored-by: Khem Raj <[email protected]>
2 parents 9312f1c + 01cd9d2 commit 41ec401

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/sys/ioctl/linux.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ mod consts {
3434
target_arch = "s390x",
3535
target_arch = "x86_64",
3636
target_arch = "aarch64",
37+
target_arch = "riscv32",
3738
target_arch = "riscv64"))]
3839
mod consts {
3940
#[doc(hidden)]

src/sys/statfs.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl Statfs {
344344
}
345345

346346
/// Total data blocks in filesystem
347-
#[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))]
347+
#[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
348348
#[cfg_attr(docsrs, doc(cfg(all())))]
349349
pub fn blocks(&self) -> u64 {
350350
self.0.f_blocks
@@ -358,7 +358,7 @@ impl Statfs {
358358
target_os = "freebsd",
359359
target_os = "openbsd",
360360
target_os = "dragonfly",
361-
all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32")))
361+
all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
362362
)))]
363363
#[cfg_attr(docsrs, doc(cfg(all())))]
364364
pub fn blocks(&self) -> libc::c_ulong {
@@ -386,7 +386,7 @@ impl Statfs {
386386
}
387387

388388
/// Free blocks in filesystem
389-
#[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))]
389+
#[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
390390
#[cfg_attr(docsrs, doc(cfg(all())))]
391391
pub fn blocks_free(&self) -> u64 {
392392
self.0.f_bfree
@@ -400,7 +400,7 @@ impl Statfs {
400400
target_os = "freebsd",
401401
target_os = "openbsd",
402402
target_os = "dragonfly",
403-
all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32")))
403+
all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
404404
)))]
405405
#[cfg_attr(docsrs, doc(cfg(all())))]
406406
pub fn blocks_free(&self) -> libc::c_ulong {
@@ -429,7 +429,7 @@ impl Statfs {
429429
}
430430

431431
/// Free blocks available to unprivileged user
432-
#[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))]
432+
#[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
433433
#[cfg_attr(docsrs, doc(cfg(all())))]
434434
pub fn blocks_available(&self) -> u64 {
435435
self.0.f_bavail
@@ -443,7 +443,7 @@ impl Statfs {
443443
target_os = "freebsd",
444444
target_os = "openbsd",
445445
target_os = "dragonfly",
446-
all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32")))
446+
all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
447447
)))]
448448
#[cfg_attr(docsrs, doc(cfg(all())))]
449449
pub fn blocks_available(&self) -> libc::c_ulong {
@@ -471,7 +471,7 @@ impl Statfs {
471471
}
472472

473473
/// Total file nodes in filesystem
474-
#[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))]
474+
#[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
475475
#[cfg_attr(docsrs, doc(cfg(all())))]
476476
pub fn files(&self) -> libc::fsfilcnt_t {
477477
self.0.f_files
@@ -485,7 +485,7 @@ impl Statfs {
485485
target_os = "freebsd",
486486
target_os = "openbsd",
487487
target_os = "dragonfly",
488-
all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32")))
488+
all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
489489
)))]
490490
#[cfg_attr(docsrs, doc(cfg(all())))]
491491
pub fn files(&self) -> libc::c_ulong {
@@ -519,7 +519,7 @@ impl Statfs {
519519
}
520520

521521
/// Free file nodes in filesystem
522-
#[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))]
522+
#[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
523523
#[cfg_attr(docsrs, doc(cfg(all())))]
524524
pub fn files_free(&self) -> libc::fsfilcnt_t {
525525
self.0.f_ffree
@@ -533,7 +533,7 @@ impl Statfs {
533533
target_os = "freebsd",
534534
target_os = "openbsd",
535535
target_os = "dragonfly",
536-
all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32")))
536+
all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
537537
)))]
538538
#[cfg_attr(docsrs, doc(cfg(all())))]
539539
pub fn files_free(&self) -> libc::c_ulong {

0 commit comments

Comments
 (0)