mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
add missing unsafe around extern
This commit is contained in:
parent
5b1b40bfd8
commit
b1d676d3b5
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ const USAGE: &str = help_usage!("hostid.md");
|
|||
const ABOUT: &str = help_about!("hostid.md");
|
||||
|
||||
// currently rust libc interface doesn't include gethostid
|
||||
extern "C" {
|
||||
unsafe extern "C" {
|
||||
pub fn gethostid() -> c_long;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ use clap::Command;
|
|||
use std::ffi::CStr;
|
||||
use uucore::{error::UResult, format_usage, help_about, help_usage, show_error};
|
||||
|
||||
extern "C" {
|
||||
unsafe extern "C" {
|
||||
// POSIX requires using getlogin (or equivalent code)
|
||||
pub fn getlogin() -> *const libc::c_char;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue