summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Marie <semarie@online.fr>2022-04-30 18:03:15 +0000
committerSébastien Marie <semarie@online.fr>2022-04-30 18:03:15 +0000
commit90fb41c2be8fbce92a82bf43a47aa194d58ac741 (patch)
tree341de67874e720c84687055502cda2e969dd31fb
parentd7abb0265da741e0fb1718ed79134a5dfbee7322 (diff)
downloadrust-libc-90fb41c2be8fbce92a82bf43a47aa194d58ac741.tar.gz
openbsd: constantify some arguments of openpty() and forkpty()
OpenBSD recently made termp and winp arguments of openpty() and forkpty() const. to match the prototypes in glibc and musl libc.
-rw-r--r--src/unix/bsd/netbsdlike/mod.rs13
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs14
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs14
3 files changed, 28 insertions, 13 deletions
diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs
index d7b23ba4cc..d7d40bd97a 100644
--- a/src/unix/bsd/netbsdlike/mod.rs
+++ b/src/unix/bsd/netbsdlike/mod.rs
@@ -688,19 +688,6 @@ extern "C" {
flag: ::c_int,
) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
- pub fn openpty(
- amaster: *mut ::c_int,
- aslave: *mut ::c_int,
- name: *mut ::c_char,
- termp: *mut termios,
- winp: *mut ::winsize,
- ) -> ::c_int;
- pub fn forkpty(
- amaster: *mut ::c_int,
- name: *mut ::c_char,
- termp: *mut termios,
- winp: *mut ::winsize,
- ) -> ::pid_t;
pub fn login_tty(fd: ::c_int) -> ::c_int;
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 10c73baae6..0afff1cd31 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -2315,6 +2315,20 @@ extern "C" {
attrnamespace: *mut ::c_int,
) -> ::c_int;
+ pub fn openpty(
+ amaster: *mut ::c_int,
+ aslave: *mut ::c_int,
+ name: *mut ::c_char,
+ termp: *mut ::termios,
+ winp: *mut ::winsize,
+ ) -> ::c_int;
+ pub fn forkpty(
+ amaster: *mut ::c_int,
+ name: *mut ::c_char,
+ termp: *mut ::termios,
+ winp: *mut ::winsize,
+ ) -> ::pid_t;
+
#[link_name = "__lutimes50"]
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
#[link_name = "__gettimeofday50"]
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 1f0b1a1ec0..550f73ac10 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1644,6 +1644,20 @@ extern "C" {
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
pub fn pthread_stackseg_np(thread: ::pthread_t, sinfo: *mut ::stack_t) -> ::c_int;
+ pub fn openpty(
+ amaster: *mut ::c_int,
+ aslave: *mut ::c_int,
+ name: *mut ::c_char,
+ termp: *const ::termios,
+ winp: *const ::winsize,
+ ) -> ::c_int;
+ pub fn forkpty(
+ amaster: *mut ::c_int,
+ name: *mut ::c_char,
+ termp: *const ::termios,
+ winp: *const ::winsize,
+ ) -> ::pid_t;
+
pub fn sysctl(
name: *const ::c_int,
namelen: ::c_uint,