NetBSD: correct link_name of some time-related functions

The futimes(), lutimes(), mq_timedreceive(), and mq_timedsend()
functions were linking against legacy library symbols that need 32-bit
time_t in structures, resulting in an ABI mismatch with 64-bit time_t.
This commit is contained in:
Jonathan A. Kollasch 2018-08-13 13:30:49 -05:00
parent 2c063c243f
commit c0fab38966
2 changed files with 4 additions and 0 deletions

View File

@ -444,6 +444,7 @@ extern {
flags: ::c_int, addr: *mut ::sockaddr,
addrlen: *mut ::socklen_t) -> ::ssize_t;
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__futimes50")]
pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;

View File

@ -1004,6 +1004,7 @@ extern {
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
#[link_name = "__lutimes50"]
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
@ -1055,11 +1056,13 @@ extern {
pub fn mq_setattr(mqd: ::mqd_t,
newattr: *const ::mq_attr,
oldattr: *mut ::mq_attr) -> ::c_int;
#[link_name = "__mq_timedreceive50"]
pub fn mq_timedreceive(mqd: ::mqd_t,
msg_ptr: *mut ::c_char,
msg_len: ::size_t,
msq_prio: *mut ::c_uint,
abs_timeout: *const ::timespec) -> ::ssize_t;
#[link_name = "__mq_timedsend50"]
pub fn mq_timedsend(mqd: ::mqd_t,
msg_ptr: *const ::c_char,
msg_len: ::size_t,