Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: proper to_ptr type cast to c_char #1796

Merged

Conversation

maxwnewcomer
Copy link
Contributor

@maxwnewcomer maxwnewcomer commented Dec 31, 2024

Platform agnostic c_char type casting

Instead of hard-casting to i8 or u8 we can just cast to the built in std::os::raw::c_char. This change allows for full arm64 compilation of mayastor.

Related

On some platforms casting to `i8` is invalid as the
compiler expects a `u8`. This applies to `CString`
and `String` `.to_ptr()` calls.

Signed-off-by: Max Newcomer <[email protected]>
@tiagolobocastro
Copy link
Contributor

thanks @maxwnewcomer
bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 37f0fbe into openebs:develop Jan 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid .as_ptr() type casts on some arm platforms
4 participants