Skip to content

Commit 38f543e

Browse files
Fix tests for cygwin again
1 parent ad9be52 commit 38f543e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ fn test_cygwin(target: &str) {
592592
"spawn.h",
593593
"stddef.h",
594594
"stdlib.h",
595+
"stdio.h",
595596
"string.h",
596597
"sys/cpuset.h",
597598
"sys/ioctl.h",
@@ -614,6 +615,7 @@ fn test_cygwin(target: &str) {
614615
"termios.h",
615616
"unistd.h",
616617
"utime.h",
618+
"utmpx.h",
617619
"wait.h",
618620
"wchar.h",
619621
);

src/unix/cygwin/mod.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,18 @@ s_no_extra_traits! {
509509
pub ifc_len: c_int,
510510
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
511511
}
512+
513+
pub struct utmpx {
514+
pub ut_type: c_short,
515+
pub ut_pid: pid_t,
516+
pub ut_line: [c_char; UT_LINESIZE],
517+
pub ut_id: [c_char; UT_IDLEN],
518+
pub ut_time: time_t,
519+
pub ut_user: [c_char; UT_NAMESIZE],
520+
pub ut_host: [c_char; UT_HOSTSIZE],
521+
pub ut_addr: c_long,
522+
pub ut_tv: timeval,
523+
}
512524
}
513525

514526
impl siginfo_t {
@@ -981,20 +993,6 @@ pub const LOGIN_PROCESS: c_short = 6;
981993
pub const USER_PROCESS: c_short = 7;
982994
pub const DEAD_PROCESS: c_short = 8;
983995

984-
#[derive(Debug, Copy, Clone)]
985-
#[repr(C)]
986-
pub struct utmpx {
987-
pub ut_type: c_short,
988-
pub ut_pid: pid_t,
989-
pub ut_line: [c_char; UT_LINESIZE],
990-
pub ut_id: [c_char; UT_IDLEN],
991-
pub ut_time: time_t,
992-
pub ut_user: [c_char; UT_NAMESIZE],
993-
pub ut_host: [c_char; UT_NAMESIZE],
994-
pub ut_addr: c_long,
995-
pub ut_tv: timeval,
996-
}
997-
998996
pub const POLLIN: c_short = 0x1;
999997
pub const POLLPRI: c_short = 0x2;
1000998
pub const POLLOUT: c_short = 0x4;

0 commit comments

Comments
 (0)