Skip to content

Commit 5b3407c

Browse files
committed
Use portable type
1 parent c4c2db1 commit 5b3407c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

rules/time/ir_unsafe.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
}
7575
},
7676
{
77-
"text": ", "
77+
"text": " as ::libc::clockid_t, "
7878
},
7979
{
8080
"placeholder": {
@@ -88,7 +88,7 @@
8888
],
8989
"params": {
9090
"a0": {
91-
"type": "i32"
91+
"type": "::libc::clockid_t"
9292
},
9393
"a1": {
9494
"type": "*mut ::libc::timespec",

rules/time/tgt_unsafe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ unsafe fn f2(a0: *mut ::libc::timeval, a1: *mut ::libc::timezone) -> i32 {
99
libc::gettimeofday(a0, a1 as *mut ::libc::timezone)
1010
}
1111

12-
unsafe fn f3(a0: i32, a1: *mut ::libc::timespec) -> i32 {
13-
libc::clock_gettime(a0, a1)
12+
unsafe fn f3(a0: ::libc::clockid_t, a1: *mut ::libc::timespec) -> i32 {
13+
libc::clock_gettime(a0 as ::libc::clockid_t, a1)
1414
}
1515

1616
unsafe fn f4(a0: *const i64, a1: *mut ::libc::tm) -> *mut ::libc::tm {

0 commit comments

Comments
 (0)