diff options
| author | Ondrej Perutka <[email protected]> | 2015-11-30 21:06:54 +0100 |
|---|---|---|
| committer | Ondrej Perutka <[email protected]> | 2015-11-30 21:06:54 +0100 |
| commit | f54af75eb7f8c861383119722f548cb2866ca813 (patch) | |
| tree | f93d4b0743351e6e8127ddd2a5b677858cdf66de /openssl/src/x509 | |
| parent | Mention el cap changes in readme (diff) | |
| download | rust-openssl-f54af75eb7f8c861383119722f548cb2866ca813.tar.xz rust-openssl-f54af75eb7f8c861383119722f548cb2866ca813.zip | |
Cast correctly c_char raw pointers (fixes build on ARM #314)
Diffstat (limited to 'openssl/src/x509')
| -rw-r--r-- | openssl/src/x509/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index 5574077a..c7039089 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -50,7 +50,7 @@ impl Deref for SslString { impl SslString { unsafe fn new(buf: *const c_char) -> SslString { SslString { - s: str::from_utf8(CStr::from_ptr(buf).to_bytes()).unwrap() + s: str::from_utf8(CStr::from_ptr(buf as *const _).to_bytes()).unwrap() } } } @@ -275,8 +275,8 @@ impl X509Generator { lift_ssl!(unsafe { let key = CString::new(key.as_bytes()).unwrap(); let value = CString::new(value.as_bytes()).unwrap(); - ffi::X509_NAME_add_entry_by_txt(name, key.as_ptr(), ffi::MBSTRING_UTF8, - value.as_ptr(), value_len, -1, 0) + ffi::X509_NAME_add_entry_by_txt(name, key.as_ptr() as *const _, ffi::MBSTRING_UTF8, + value.as_ptr() as *const _, value_len, -1, 0) }) } |