@@ -22,8 +22,14 @@ pub struct KEvent {
22
22
target_os = "dragonfly" , target_os = "macos" ,
23
23
target_os = "ios" ) ) ]
24
24
type type_of_udata = * mut :: c_void ;
25
+ #[ cfg( any( target_os = "openbsd" , target_os = "freebsd" ,
26
+ target_os = "dragonfly" , target_os = "macos" ,
27
+ target_os = "ios" ) ) ]
28
+ type type_of_data = libc:: intptr_t ;
25
29
#[ cfg( any( target_os = "netbsd" ) ) ]
26
30
type type_of_udata = intptr_t ;
31
+ #[ cfg( any( target_os = "netbsd" ) ) ]
32
+ type type_of_data = libc:: int64_t ;
27
33
28
34
#[ cfg( not( target_os = "netbsd" ) ) ]
29
35
type type_of_event_filter = i16 ;
@@ -58,9 +64,9 @@ pub enum EventFilter {
58
64
}
59
65
60
66
#[ cfg( target_os = "netbsd" ) ]
61
- type type_of_event_filter = i32 ;
67
+ type type_of_event_filter = libc :: uint32_t ;
62
68
#[ cfg( target_os = "netbsd" ) ]
63
- #[ repr( u32 ) ]
69
+ #[ repr( i32 ) ]
64
70
#[ derive( Clone , Copy , Debug , PartialEq ) ]
65
71
pub enum EventFilter {
66
72
EVFILT_READ = libc:: EVFILT_READ ,
@@ -216,7 +222,7 @@ impl KEvent {
216
222
filter : filter as type_of_event_filter ,
217
223
flags : flags. bits ( ) ,
218
224
fflags : fflags. bits ( ) ,
219
- data : data,
225
+ data : data as type_of_data ,
220
226
udata : udata as type_of_udata
221
227
} }
222
228
}
@@ -238,7 +244,7 @@ impl KEvent {
238
244
}
239
245
240
246
pub fn data ( & self ) -> intptr_t {
241
- self . kevent . data
247
+ self . kevent . data as intptr_t
242
248
}
243
249
244
250
pub fn udata ( & self ) -> intptr_t {
0 commit comments