Skip to content

Commit 095d800

Browse files
authored
Fix compilation with Rust 1.63. (#1017)
* Fix compilation with Rust 1.63. Rust 1.63 doesn't have `core::ffi::c_int`, so use the `c_int` from libc or linux-raw-sys. * Update the install-rust action to node20.
1 parent 30739be commit 095d800

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/actions/install-rust/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ inputs:
88
default: 'stable'
99

1010
runs:
11-
using: node16
11+
using: node20
1212
main: 'main.js'

src/system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![allow(unsafe_code)]
88

99
use crate::backend;
10-
#[cfg(target_os = "linux")]
10+
#[cfg(any(linux_raw, target_os = "linux"))]
1111
use crate::backend::c;
1212
use crate::ffi::CStr;
1313
#[cfg(not(any(target_os = "espidf", target_os = "emscripten", target_os = "vita")))]
@@ -20,7 +20,7 @@ pub use backend::system::types::Sysinfo;
2020
#[cfg(linux_raw)]
2121
use crate::fd::AsFd;
2222
#[cfg(linux_raw)]
23-
use core::ffi::c_int;
23+
use c::c_int;
2424

2525
/// `uname()`—Returns high-level information about the runtime OS and
2626
/// hardware.

0 commit comments

Comments
 (0)