diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-09-10 14:03:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-10 14:03:24 +0200 |
| commit | 1e4ab871f5e548fa181d644691f693722d8fc6ba (patch) | |
| tree | fc22425cf6e44b121fa676684646a9cf378c28b6 /src/liballoc_system | |
| parent | 65fd1a20b05e17b3880caba45920507b6d64d796 (diff) | |
| parent | 5b76b8681c088d935b60da05e8ae81e2594f46f5 (diff) | |
| download | rust-1e4ab871f5e548fa181d644691f693722d8fc6ba.tar.gz rust-1e4ab871f5e548fa181d644691f693722d8fc6ba.zip | |
Rollup merge of #44372 - bgermann:master, r=alexcrichton
Use memalign instead of posix_memalign for Solaris As pointed out in https://github.com/rust-lang/libc/commit/deb61c8, Solaris 10 does not support posix_memalign. Use memalign for all Solaris versions instead. With this change applied I am able to cross-build rustc for Solaris 10.
Diffstat (limited to 'src/liballoc_system')
| -rw-r--r-- | src/liballoc_system/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 1defe308713..599d79104c3 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -221,7 +221,7 @@ mod platform { } } - #[cfg(any(target_os = "android", target_os = "redox"))] + #[cfg(any(target_os = "android", target_os = "redox", target_os = "solaris"))] #[inline] unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { // On android we currently target API level 9 which unfortunately @@ -244,7 +244,7 @@ mod platform { libc::memalign(layout.align(), layout.size()) as *mut u8 } - #[cfg(not(any(target_os = "android", target_os = "redox")))] + #[cfg(not(any(target_os = "android", target_os = "redox", target_os = "solaris")))] #[inline] unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { let mut out = ptr::null_mut(); |
