Skip to content

Commit c6214cc

Browse files
committed
Get some more tests passing on OpenBSD
1 parent f7db08b commit c6214cc

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

nix-test/src/const.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,31 @@ get_int_const(const char* err) {
209209
GET_CONST(ECANCELED);
210210
#endif
211211

212+
#if defined(__OpenBSD__)
213+
GET_CONST(EAUTH);
214+
GET_CONST(EBADRPC);
215+
GET_CONST(ECANCELED);
216+
GET_CONST(EDQUOT);
217+
GET_CONST(EFTYPE);
218+
GET_CONST(EILSEQ);
219+
GET_CONST(EIPSEC);
220+
GET_CONST(EMEDIUMTYPE);
221+
GET_CONST(ENEEDAUTH);
222+
GET_CONST(ENOATTR);
223+
GET_CONST(ENOMEDIUM);
224+
GET_CONST(ENOTSUP);
225+
GET_CONST(EOPNOTSUPP);
226+
GET_CONST(EOVERFLOW);
227+
GET_CONST(EPROCLIM);
228+
GET_CONST(EPROCUNAVAIL);
229+
GET_CONST(EPROGMISMATCH);
230+
GET_CONST(EPROGUNAVAIL);
231+
GET_CONST(EREMOTE);
232+
GET_CONST(ERPCMISMATCH);
233+
GET_CONST(ESTALE);
234+
GET_CONST(EUSERS);
235+
#endif
236+
212237
#ifdef DARWIN
213238
GET_CONST(EPWROFF);
214239
GET_CONST(EDEVERR);

src/sys/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fn test_struct_kevent() {
330330
assert!(expected.filter == actual.filter() as type_of_event_filter);
331331
assert!(expected.flags == actual.flags().bits());
332332
assert!(expected.fflags == actual.fflags().bits());
333-
assert!(expected.data == actual.data());
333+
assert!(expected.data == actual.data() as type_of_data);
334334
assert!(expected.udata == actual.udata() as type_of_udata);
335335
assert!(mem::size_of::<libc::kevent>() == mem::size_of::<KEvent>());
336336
}

src/sys/signal.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
use libc;
55
use {Errno, Error, Result};
6+
#[cfg(not(target_os = "openbsd"))]
67
use std::fmt;
8+
#[cfg(not(target_os = "openbsd"))]
79
use std::fmt::Debug;
810
use std::mem;
911
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]

0 commit comments

Comments
 (0)