Skip to content

Commit 37dde8a

Browse files
authored
Merge pull request #137 from sched-ext/scx-utils-fix-build
scx_utils: use c_char to prevent build failures
2 parents b5f3f7f + f5a2119 commit 37dde8a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rust/scx_utils/src/user_exit_info.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::bindings;
66
use anyhow::bail;
77
use anyhow::Result;
88
use std::ffi::CStr;
9+
use std::os::raw::c_char;
910

1011
pub enum ScxExitKind {
1112
None = bindings::scx_exit_kind_SCX_EXIT_NONE as isize,
@@ -71,9 +72,9 @@ impl UserExitInfo {
7172
/// type which then calls this method with the individual fields.
7273
pub fn new(
7374
kind_ptr: *const i32,
74-
reason_ptr: *const i8,
75-
msg_ptr: *const i8,
76-
dump_ptr: *const i8,
75+
reason_ptr: *const c_char,
76+
msg_ptr: *const c_char,
77+
dump_ptr: *const c_char,
7778
) -> Self {
7879
let kind = unsafe { std::ptr::read_volatile(kind_ptr) };
7980

0 commit comments

Comments
 (0)