Skip to content

Commit f0a2c3e

Browse files
tgross35mbyx
andcommitted
haiku: Switch from e! to c_enum!
The enums used on Haiku are currently broken: they have no `repr` attribute so Rust is treating them as a `u8` when they need to be `c_int`. This is flagged by `improper_ctypes`, which only shows up now that this lint got removed. Since this is broken anyway, we may as well just switch to `c_enum!`. This is a user-visible breaking change, but allowed as the target is tier 3. Partially cherry picked from commit a541bf4 ("libc: remove uses of enum as per #4419"). Co-authored-by: mbyx <[email protected]>
1 parent 54d5823 commit f0a2c3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unix/haiku/native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub type thread_func = extern "C" fn(*mut c_void) -> status_t;
4646
// kernel/image.h
4747
pub type image_id = i32;
4848

49-
e! {
49+
c_enum! {
5050
// kernel/OS.h
5151
pub enum thread_state {
5252
B_THREAD_RUNNING = 1,

0 commit comments

Comments
 (0)