adding gethostid/sethostid to most unixes (redox still unimplemented at

the moment).
This commit is contained in:
David CARLIER 2021-08-10 18:31:40 +01:00 committed by David Carlier
parent 3af2448130
commit 43c316e287
14 changed files with 28 additions and 0 deletions

View File

@ -1649,6 +1649,7 @@ getgrgid_r
getgrnam
getgrnam_r
getgrouplist
gethostid
getifaddrs
getitimer
getline
@ -1863,6 +1864,7 @@ sendmsg
setdomainname
setgrent
setgroups
sethostid
sethostname
setitimer
setpriority

View File

@ -1219,6 +1219,7 @@ getgrgid_r
getgrnam
getgrnam_r
getgrouplist
gethostid
getifaddrs
getitimer
getline
@ -1375,6 +1376,7 @@ sendmsg
setdomainname
setgrent
setgroups
sethostid
sethostname
setitimer
setpriority

View File

@ -1421,6 +1421,7 @@ getgrgid_r
getgrnam
getgrnam_r
getgrouplist
gethostid
getifaddrs
getitimer
getline
@ -1643,6 +1644,7 @@ sendmsg
setdomainname
setgrent
setgroups
sethostid
sethostname
setitimer
setpriority

View File

@ -569,6 +569,7 @@ qsort_r
reallocarray
semid_ds
seminfo
sethostid
setutxent
setxattr
sgetspent_r

View File

@ -2738,6 +2738,7 @@ getgrgid_r
getgrnam
getgrnam_r
getgrouplist
gethostid
getifaddrs
getline
getloadavg

View File

@ -1118,6 +1118,7 @@ getgrgid_r
getgrnam
getgrnam_r
getgrouplist
gethostid
getifaddrs
getitimer
getlastlogx
@ -1282,6 +1283,7 @@ sendmsg
setdomainname
setgrent
setgroups
sethostid
sethostname
setitimer
setpriority

View File

@ -936,6 +936,7 @@ getgrgid_r
getgrnam
getgrnam_r
getgrouplist
gethostid
getifaddrs
getitimer
getline
@ -1053,6 +1054,7 @@ sendmsg
setdomainname
setgrent
setgroups
sethostid
sethostname
setitimer
setpriority

View File

@ -4414,6 +4414,9 @@ extern "C" {
/// `id` is of type [`uuid_t`].
pub fn gethostuuid(id: *mut u8, timeout: *const ::timespec) -> ::c_int;
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long);
pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus;
pub fn _NSGetExecutablePath(buf: *mut ::c_char, bufsize: *mut u32) -> ::c_int;

View File

@ -1643,6 +1643,8 @@ extern "C" {
pub fn explicit_bzero(s: *mut ::c_void, len: ::size_t);
// ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1
pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int;
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long);
}
#[link(name = "rt")]

View File

@ -745,6 +745,8 @@ extern "C" {
extern "C" {
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
}
cfg_if! {

View File

@ -1339,6 +1339,8 @@ extern "C" {
) -> ::c_int;
pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
}
extern "C" {

View File

@ -3837,6 +3837,8 @@ extern "C" {
new_value: *const ::itimerspec,
old_value: *mut ::itimerspec,
) -> ::c_int;
pub fn gethostid() -> ::c_long;
}
cfg_if! {

View File

@ -287,6 +287,8 @@ extern "C" {
iovcnt: ::c_int,
offset: ::off64_t,
) -> ::ssize_t;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
}
cfg_if! {

View File

@ -2657,6 +2657,9 @@ extern "C" {
pub fn p_online(processorid: ::processorid_t, flag: ::c_int) -> ::c_int;
pub fn getexecname() -> *const ::c_char;
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
}
mod compat;