From 7ea6bfd2255af8c79a608f2bdf8a7d7f9f48107d Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 6 Oct 2025 00:30:06 +0100 Subject: [PATCH] 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. --- perf-event-open-sys/src/functions.rs | 2 +- perf-event/src/hooks.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/perf-event-open-sys/src/functions.rs b/perf-event-open-sys/src/functions.rs index ff556c0..2cd679c 100644 --- a/perf-event-open-sys/src/functions.rs +++ b/perf-event-open-sys/src/functions.rs @@ -86,7 +86,7 @@ pub mod ioctls { { DISABLE, DISABLE, c_uint } { REFRESH, REFRESH, c_int } { RESET, RESET, c_uint } - { PERIOD, PERIOD, u64 } + { PERIOD, PERIOD, *const u64 } { SET_OUTPUT, SET_OUTPUT, c_int } { SET_FILTER, SET_FILTER, *mut c_char } { ID, ID, *mut u64 } diff --git a/perf-event/src/hooks.rs b/perf-event/src/hooks.rs index 591b6c1..d7cac98 100644 --- a/perf-event/src/hooks.rs +++ b/perf-event/src/hooks.rs @@ -118,7 +118,7 @@ macro_rules! define_ioctls { $expand ! { DISABLE, perf_event_ioctls_DISABLE, c_uint } $expand ! { REFRESH, perf_event_ioctls_REFRESH, c_int } $expand ! { RESET, perf_event_ioctls_RESET, c_uint } - $expand ! { PERIOD, perf_event_ioctls_PERIOD, u64 } + $expand ! { PERIOD, perf_event_ioctls_PERIOD, *const u64 } $expand ! { SET_OUTPUT, perf_event_ioctls_SET_OUTPUT, c_int } $expand ! { SET_FILTER, perf_event_ioctls_SET_FILTER, *mut c_char } $expand ! { ID, perf_event_ioctls_ID, *mut u64 }