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

i686-linux-android libc and libstd disagree on c_char #561

Closed
dten opened this issue Mar 29, 2017 · 3 comments
Closed

i686-linux-android libc and libstd disagree on c_char #561

dten opened this issue Mar 29, 2017 · 3 comments

Comments

@dten
Copy link

dten commented Mar 29, 2017

So std lib seems to be wrong about this. but what to do? a lot of things just don't compile (looking at openssl) because of CString and CStr

libstd says that c_char is u8
https://github.com/rust-lang/rust/blob/b1363a73ede57ae595f3a1be2bb75d308ba4f7f6/src/libstd/os/raw.rs#L15

libc says that c_char is i8
https://github.com/rust-lang/libc/blob/master/src/unix/notbsd/android/b32/x86.rs#L1

@malbarbo
Copy link
Contributor

This was fixed when rust libc was update to 0.2.21. See rust-lang/rust#40903.

Using rustc nightly (2017-03-29) should make your code compile.

@dten
Copy link
Author

dten commented Mar 30, 2017

Such timing! I'll give it a try

@dten
Copy link
Author

dten commented Mar 30, 2017

it works 👍

@dten dten closed this as completed Mar 30, 2017
danielverkamp pushed a commit to danielverkamp/libc that referenced this issue Apr 28, 2020
Currently these are gated by the `atomics` feature unconditionally, but that may
be tweaked in the future! Otherwise this should enable building out some
primitives in the standard library using these intrinsics.
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

No branches or pull requests

2 participants