mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
add missing unsafe around extern
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user