Skip to content

Commit 7ea6bfd

Browse files
committed
perf-event-open-sys: fix argument type for ioctls::PERIOD
PERF_EVENT_IOC_PERIOD ioctl is expecting a pointer to a u64 rather than a plain u64. This commit fixes that.
1 parent fbd1802 commit 7ea6bfd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

perf-event-open-sys/src/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub mod ioctls {
8686
{ DISABLE, DISABLE, c_uint }
8787
{ REFRESH, REFRESH, c_int }
8888
{ RESET, RESET, c_uint }
89-
{ PERIOD, PERIOD, u64 }
89+
{ PERIOD, PERIOD, *const u64 }
9090
{ SET_OUTPUT, SET_OUTPUT, c_int }
9191
{ SET_FILTER, SET_FILTER, *mut c_char }
9292
{ ID, ID, *mut u64 }

perf-event/src/hooks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ macro_rules! define_ioctls {
118118
$expand ! { DISABLE, perf_event_ioctls_DISABLE, c_uint }
119119
$expand ! { REFRESH, perf_event_ioctls_REFRESH, c_int }
120120
$expand ! { RESET, perf_event_ioctls_RESET, c_uint }
121-
$expand ! { PERIOD, perf_event_ioctls_PERIOD, u64 }
121+
$expand ! { PERIOD, perf_event_ioctls_PERIOD, *const u64 }
122122
$expand ! { SET_OUTPUT, perf_event_ioctls_SET_OUTPUT, c_int }
123123
$expand ! { SET_FILTER, perf_event_ioctls_SET_FILTER, *mut c_char }
124124
$expand ! { ID, perf_event_ioctls_ID, *mut u64 }

0 commit comments

Comments
 (0)