File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#include < poll.h>
55
66typedef struct pollfd t1;
7+ typedef nfds_t t2;
78
89int f1 (struct pollfd *fds, nfds_t nfds, int timeout) {
910 return poll (fds, nfds, timeout);
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ fn t1() -> ::libc::pollfd {
55 unsafe { std:: mem:: zeroed ( ) }
66}
77
8- unsafe fn f1 ( a0 : * mut :: libc:: pollfd , a1 : u64 , a2 : i32 ) -> i32 {
8+ fn t2 ( ) -> :: libc:: nfds_t {
9+ 0
10+ }
11+
12+ unsafe fn f1 ( a0 : * mut :: libc:: pollfd , a1 : :: libc:: nfds_t , a2 : i32 ) -> i32 {
913 libc:: poll ( a0, a1 as :: libc:: nfds_t , a2)
1014}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ fn main_0() -> i32 {
6464 let mut __idx = Vec :: new( ) ;
6565 let mut __wanted = Vec :: new( ) ;
6666 let mut __events = Vec :: new( ) ;
67- for __i in 0 ..( 2_u64 as usize ) {
67+ for __i in 0 ..( ( 2 as :: libc :: nfds_t ) as usize ) {
6868 let ( __fd, __ev) = __p
6969 . offset( __i)
7070 . with( |__e| ( * __e. fd. borrow( ) , * __e. events. borrow( ) ) ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ unsafe fn main_0() -> i32 {
2929 pfd[ ( 1 ) as usize ] . fd = -1_i32 ;
3030 pfd[ ( 1 ) as usize ] . events = 1_i16 ;
3131 pfd[ ( 1 ) as usize ] . revents = 42_i16 ;
32- assert ! ( ( ( ( ( libc:: poll( pfd. as_mut_ptr( ) , 2_u64 as :: libc:: nfds_t, 0 ) ) == ( 1 ) ) as i32 ) != 0 ) ) ;
32+ assert ! (
33+ ( ( ( ( libc:: poll( pfd. as_mut_ptr( ) , ( 2 as :: libc:: nfds_t) as :: libc:: nfds_t, 0 ) ) == ( 1 ) )
34+ as i32 )
35+ != 0 )
36+ ) ;
3337 assert ! ( ( ( ( ( ( pfd[ ( 0 ) as usize ] . revents as i32 ) & ( 1 ) ) != ( 0 ) ) as i32 ) != 0 ) ) ;
3438 assert ! ( ( ( ( ( pfd[ ( 1 ) as usize ] . revents as i32 ) == ( 0 ) ) as i32 ) != 0 ) ) ;
3539 let mut ch: libc:: c_char = ( 0 as libc:: c_char ) ;
You can’t perform that action at this time.
0 commit comments