add missing unsafe around extern

This commit is contained in:
Sylvestre Ledru
2025-03-24 21:03:00 +01:00
parent 5b1b40bfd8
commit b1d676d3b5
2 changed files with 2 additions and 2 deletions
+1 -1
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;
}
+1 -1
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;
}