1
Fork 0
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:
Sylvestre Ledru 2025-03-08 14:50:57 +01:00
parent 5b1b40bfd8
commit b1d676d3b5
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}