Skip to content

Commit

Permalink
tests should ignore setservent() and endservent() on illumos
Browse files Browse the repository at this point in the history
Depending on the compilation environment (e.g., whether the 3XNET or
3SOCKET version of these functions is in play, whether EXTENSIONS has
been defined, etc) these functions may be declared to return either void
or int.  The return value is hard coded as zero, and can be ignored to
better align with other platforms where these functions are always void.
  • Loading branch information
jclulow committed Nov 26, 2020
1 parent e67af59 commit 297c002
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,11 @@ fn test_solarish(target: &str) {
"madvise" | "mprotect" if is_illumos => true,
"door_call" | "door_return" | "door_create" if is_illumos => true,

// These functions may return int or void depending on the exact
// configuration of the compilation environment, but the return
// value is not useful (always 0) so we can ignore it:
"setservent" | "endservent" if is_illumos => true,

_ => false,
}
});
Expand Down

0 comments on commit 297c002

Please sign in to comment.