summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
authorAndrei-Marius Radu <thendiscard@users.noreply.github.com>2019-01-14 22:18:06 +0200
committerAndrei-Marius Radu <thendiscard@users.noreply.github.com>2019-01-15 00:53:52 +0200
commitbdca86b8f779ca258106c44ba380c0bd508ce911 (patch)
tree48be710bf6c49f0ec81b0fea47a70ad5d3d29498 /src/unistd.rs
parent7bcd9d2318602553c6bd917a4e552a580f9156bb (diff)
downloadnix-bdca86b8f779ca258106c44ba380c0bd508ce911.zip
Fix build and tests issues on OpenBSD 6.4+
1) lutimes doesn't exist on OpenBSD so it needs to be under conditional compilation. The only "reference" that I could find related to this is the discussion here: https://github.com/rust-lang/libc/pull/790 . 2) fexecve doesn't exist on OpenBSD so add conditional compilation for it in unistd and in related tests. The only "reference" that I could find is a mention that fexecve is not implemented on OpenBSD in the manual pages for signal(3) and sigaction(2): Official repository (search for "fexecve"): https://cvsweb.openbsd.org/src/lib/libc/sys/sigaction.2?rev=1.75&content-type=text/x-cvsweb-markup Github mirror: https://github.com/openbsd/src/blob/master/lib/libc/sys/sigaction.2#L619 3) AIO doesn't work on OpenBSD so put test_aio_drop under conditional compilation. 4) Add relevant changelog entries. P.S. On OpenBSD remains the issue of test_scm_rights which builds correctly but fails at runtime.
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/unistd.rs b/src/unistd.rs
index 2c00f7f0..a41c1392 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -760,11 +760,12 @@ pub fn execvpe(filename: &CString, args: &[CString], env: &[CString]) -> Result<
///
/// This function is similar to `execve`, except that the program to be executed
/// is referenced as a file descriptor instead of a path.
+// Note for NetBSD and OpenBSD: although rust-lang/libc includes it (under
+// unix/bsd/netbsdlike/) fexecve is not currently implemented on NetBSD nor on
+// OpenBSD.
#[cfg(any(target_os = "android",
- target_os = "freebsd",
target_os = "linux",
- target_os = "netbsd",
- target_os = "openbsd"))]
+ target_os = "freebsd"))]
#[inline]
pub fn fexecve(fd: RawFd, args: &[CString], env: &[CString]) -> Result<Void> {
let args_p = to_exec_array(args);