You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
Hi
I'm not a rust expert, but during cargo build:
error[E0308]: mismatched types
--> src/main.rs:186:28
|
186 | let fd = unsafe { open(path.as_ref().as_os_str().as_bytes().as_ptr() as *const i8, O_RDWR) };
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
| |
| arguments to this function are incorrect
|
= note: expected raw pointer *const u8
found raw pointer *const i8
note: function defined here
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.72/src/unix/mod.rs:718:12
|
718 | pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
| ^^^^
switching i8 to u8 fix the issue
Rgds
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi
I'm not a rust expert, but during cargo build:
error[E0308]: mismatched types
--> src/main.rs:186:28
|
186 | let fd = unsafe { open(path.as_ref().as_os_str().as_bytes().as_ptr() as *const i8, O_RDWR) };
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
u8
, foundi8
| |
| arguments to this function are incorrect
|
= note: expected raw pointer
*const u8
found raw pointer
*const i8
note: function defined here
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.72/src/unix/mod.rs:718:12
|
718 | pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
| ^^^^
switching i8 to u8 fix the issue
Rgds
The text was updated successfully, but these errors were encountered: