summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-09-19 15:36:16 +0100
committerDavid Carlier <devnexen@gmail.com>2021-09-19 14:57:43 +0100
commit2cb8a4395d259a5e6328b4f76e19673b651569c7 (patch)
tree193b5c7dd2f738836fe58a2bc765f23a8b52147c
parent1ac780a77a92afb37975974f90e371a360c06626 (diff)
downloadrust-libc-2cb8a4395d259a5e6328b4f76e19673b651569c7.tar.gz
BSD add utrace calls
-rw-r--r--libc-test/build.rs6
-rw-r--r--libc-test/semver/dragonfly.txt1
-rw-r--r--libc-test/semver/freebsd.txt1
-rw-r--r--libc-test/semver/netbsd.txt1
-rw-r--r--libc-test/semver/openbsd.txt1
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs1
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs1
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs1
8 files changed, 13 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index f568affc7d..afef1af570 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -428,10 +428,13 @@ fn test_openbsd(target: &str) {
"sys/file.h",
"sys/ioctl.h",
"sys/mman.h",
+ "sys/param.h",
"sys/resource.h",
"sys/shm.h",
"sys/socket.h",
"sys/time.h",
+ "sys/uio.h",
+ "sys/ktrace.h",
"sys/un.h",
"sys/wait.h",
"unistd.h",
@@ -969,6 +972,7 @@ fn test_netbsd(target: &str) {
"sys/file.h",
"sys/ioctl.h",
"sys/ioctl_compat.h",
+ "sys/ktrace.h",
"sys/mman.h",
"sys/mount.h",
"sys/ptrace.h",
@@ -1185,6 +1189,7 @@ fn test_dragonflybsd(target: &str) {
"sys/file.h",
"sys/ioctl.h",
"sys/ipc.h",
+ "sys/ktrace.h",
"sys/mman.h",
"sys/mount.h",
"sys/ptrace.h",
@@ -1815,6 +1820,7 @@ fn test_freebsd(target: &str) {
"sys/types.h",
"sys/ucontext.h",
"sys/uio.h",
+ "sys/ktrace.h",
"sys/un.h",
"sys/user.h",
"sys/utsname.h",
diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt
index 903f3f981e..c6dc07cd39 100644
--- a/libc-test/semver/dragonfly.txt
+++ b/libc-test/semver/dragonfly.txt
@@ -1462,6 +1462,7 @@ uselocale
utimensat
utmpx
utmpxname
+utrace
uuid
uuid_t
vm_size_t
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index 99aa6dd80a..7cab6f1739 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -1756,6 +1756,7 @@ useconds_t
uselocale
utimensat
utmpx
+utrace
vm_size_t
wait4
waitid
diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt
index a2b44a5d33..17f2953242 100644
--- a/libc-test/semver/netbsd.txt
+++ b/libc-test/semver/netbsd.txt
@@ -1392,6 +1392,7 @@ utmp
utmpx
utmpxname
utpname
+utrace
vm_size_t
wait4
waitid
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt
index 228c617fa8..6a736ab964 100644
--- a/libc-test/semver/openbsd.txt
+++ b/libc-test/semver/openbsd.txt
@@ -1119,5 +1119,6 @@ useconds_t
uselocale
utimensat
utmp
+utrace
wait4
xucred
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index 05648c9a9b..72ac633cb9 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -1567,6 +1567,7 @@ extern "C" {
pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int;
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int;
+ pub fn utrace(addr: *const ::c_void, len: ::size_t) -> ::c_int;
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t)
-> ::ssize_t;
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index e38f224186..18d6137041 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -2147,6 +2147,7 @@ extern "C" {
) -> ::c_int;
pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_void, data: ::c_int) -> ::c_int;
+ pub fn utrace(label: *const ::c_char, addr: *mut ::c_void, len: ::size_t) -> ::c_int;
pub fn pthread_setname_np(
t: ::pthread_t,
name: *const ::c_char,
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 4812db6f5c..0b28514e60 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1561,6 +1561,7 @@ extern "C" {
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: caddr_t, data: ::c_int) -> ::c_int;
+ pub fn utrace(label: *const ::c_char, addr: *const ::c_void, len: ::size_t) -> ::c_int;
pub fn memmem(
haystack: *const ::c_void,
haystacklen: ::size_t,