Skip to content

Commit 0348155

Browse files
committed
add login_tty api from libutil
1 parent 173c5be commit 0348155

File tree

5 files changed

+5
-1
lines changed

5 files changed

+5
-1
lines changed

libc-test/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ fn do_ctest() {
124124
}
125125
cfg.header("arpa/inet.h");
126126
cfg.header("xlocale.h");
127-
cfg.header("utmp.h");
128127
cfg.header("ifaddrs.h");
129128
if i686 || x86_64 {
130129
cfg.header("sys/reg.h");
@@ -208,6 +207,7 @@ fn do_ctest() {
208207
cfg.header("sys/personality.h");
209208
cfg.header("sys/swap.h");
210209
cfg.header("pty.h");
210+
cfg.header("utmp.h");
211211
if !uclibc {
212212
cfg.header("sys/sysinfo.h");
213213
}

src/unix/bsd/apple/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,6 +3168,7 @@ extern {
31683168
name: *mut ::c_char,
31693169
termp: *mut termios,
31703170
winp: *mut ::winsize) -> ::pid_t;
3171+
pub fn login_tty(fd: ::c_int) -> ::c_int;
31713172
pub fn duplocale(base: ::locale_t) -> ::locale_t;
31723173
pub fn freelocale(loc: ::locale_t) -> ::c_int;
31733174
pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,7 @@ extern {
12991299
name: *mut ::c_char,
13001300
termp: *mut termios,
13011301
winp: *mut ::winsize) -> ::pid_t;
1302+
pub fn login_tty(fd: ::c_int) -> ::c_int;
13021303
}
13031304

13041305
cfg_if! {

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ extern {
643643
name: *mut ::c_char,
644644
termp: *mut termios,
645645
winp: *mut ::winsize) -> ::pid_t;
646+
pub fn login_tty(fd: ::c_int) -> ::c_int;
646647
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
647648
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
648649

src/unix/notbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,7 @@ extern {
13831383
name: *mut ::c_char,
13841384
termp: *const termios,
13851385
winp: *const ::winsize) -> ::c_int;
1386+
pub fn login_tty(fd: ::c_int) -> ::c_int;
13861387
pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
13871388
envp: *const *const ::c_char) -> ::c_int;
13881389
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,

0 commit comments

Comments
 (0)