Skip to content

Commit

Permalink
Auto merge of #3455 - pfmooney:illumos-tests, r=JohnTitor
Browse files Browse the repository at this point in the history
Fix libc-tests for illumos/solaris target

This brings the tests back to passing on modern illumos machines.
  • Loading branch information
bors committed Nov 28, 2023
2 parents 3195caf + 7cdb213 commit 7d8a284
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions libc-test/build.rs
Expand Up @@ -1008,6 +1008,10 @@ fn test_solarish(target: &str) {
"madvise" | "mprotect" if is_illumos => true,
"door_call" | "door_return" | "door_create" if is_illumos => true,

// The compat functions use these "native" functions linked to their
// non-prefixed implementations in libc.
"native_getpwent_r" | "native_getgrent_r" => true,

// Not visible when build with _XOPEN_SOURCE=700
"mmapobj" | "mmap64" | "meminfo" | "getpagesizes" | "getpagesizes2" => true,

Expand All @@ -1016,6 +1020,12 @@ fn test_solarish(target: &str) {
// value is not useful (always 0) so we can ignore it:
"setservent" | "endservent" if is_illumos => true,

// Following illumos#3729, getifaddrs was changed to a
// redefine_extname symbol in order to preserve compatibility.
// Until better symbol binding story is figured out, it must be
// excluded from the tests.
"getifaddrs" if is_illumos => true,

_ => false,
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/unix/solarish/mod.rs
Expand Up @@ -3203,9 +3203,9 @@ extern "C" {

pub fn sync();

fn __major(version: ::c_int, devnum: ::dev_t) -> ::major_t;
fn __minor(version: ::c_int, devnum: ::dev_t) -> ::minor_t;
fn __makedev(version: ::c_int, majdev: ::major_t, mindev: ::minor_t) -> ::dev_t;
pub fn __major(version: ::c_int, devnum: ::dev_t) -> ::major_t;
pub fn __minor(version: ::c_int, devnum: ::dev_t) -> ::minor_t;
pub fn __makedev(version: ::c_int, majdev: ::major_t, mindev: ::minor_t) -> ::dev_t;
}

#[link(name = "sendfile")]
Expand Down

0 comments on commit 7d8a284

Please sign in to comment.