blob: 6fc981e2aa6b72651e56dd1dcca669e7953180a4 [file] [log] [blame]
Do not use open64 on linux with musl
glibc is providing open64 and other lfs64 functions but musl aliases
them to normal equivalents since off_t is always 64-bit on musl,
therefore check for target env along when target OS is linux before
using open64, this is more available. Latest Musl has made these
namespace changes [1]
[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
Upstream-Status: Submitted [https://github.com/rust-random/getrandom/pull/326]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/vendor/getrandom-0.2.0/.cargo-checksum.json
+++ b/vendor/getrandom-0.2.0/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"4a5b61c82668507beffc7ad33f602257013263d7847cf17a246ef1128ba27950","Cargo.toml":"b59322815506cf16acd6e0cbe2634dec1be0886e686b51fa5cdf5a5ac9fdcf32","LICENSE-APACHE":"aaff376532ea30a0cd5330b9502ad4a4c8bf769c539c87ffe78819d188a18ebf","LICENSE-MIT":"209fbbe0ad52d9235e37badf9cadfe4dbdc87203179c0899e738b39ade42177b","README.md":"e0bacefbe4310c23578c65926bda6e4318750f6718bb6b97ff9a4fa9056af6a6","benches/mod.rs":"5495735ff210a50cab23c2cc84191ed910af7c30395a3d9d6095b722765b3864","build.rs":"90355b5e76dedd97d604cd83b4a0a5ab074bbd4dde9632ee2b56c87c175b1e14","src/bsd_arandom.rs":"d2ee195acd80c7d1364a369ad0d2dad46f5f9f973f9d3960367413fd87acfcd6","src/cloudabi.rs":"9201af65a607587aa8615ec92cfab9d176f4199f6799dad9ca743c51d175028b","src/custom.rs":"f75ef80ec024fe3c97c7faff79de9f7d457993ed3c5f69f21593e140c8b62790","src/error.rs":"f40aa6cb36bc024285dc2e40349fdd3754db949a307ec73831ec253549d2b0a3","src/error_impls.rs":"733ed75ab89a9d0d5a7cc7abd85f31a23d772ea9c1e7c10def1477207d19fd8b","src/fuchsia.rs":"470d8509deb5b06fa6417f294c0a49e0e35a580249a5d8944c3be5aa746f64ea","src/ios.rs":"cc46ee9c48ab746d2af342a242e383b8de840045d3f52fd77ee337161367a1a1","src/lib.rs":"6aff4b429e4b1a07aad2ab7148d7cc9d0987b230597649af42041508320592e0","src/linux_android.rs":"39cb80999c8534145240a350976d261b8924436bf9a4563960c7bd8c2c83c773","src/macos.rs":"b692f2fcc2319a5195f47751d5bd7dd87c7c24a61d14fa4e3dbc992ae66212b7","src/openbsd.rs":"066b2dd395c190444a658bb0b52a052eabbd68ea5a534fb729c7e5373abc0a6a","src/rdrand.rs":"79d23183b1905d61bd9df9729dc798505a2ed750d3339e342ab144e1709827e4","src/solaris_illumos.rs":"9c7004446fabe5a7a21c73d5a65d7e2115b5bd1d1dbb735c984cab3dba239785","src/stdweb.rs":"f140081e47cfbb61937212e7840391bce5adf7829039d732d62b82a19e567dfa","src/test_common.rs":"895d71c06722e3a6f365999d29430f37f571aeb1eb4a525777b760005c9818be","src/test_rdrand.rs":"8c8df6de836463a41808396016428bf0a2a69c715ae96e7e0e7598fcea61ace8","src/use_file.rs":"c9fe635a83614be6f303e40f98b8e678c36ac6d9724b024430d3ea1ad1510add","src/util.rs":"da6964dc1523f1cb8d26365fa6a8ece46360587e6974931624b271f0c72cda8b","src/util_libc.rs":"d851394bc9c43dc09afde1e03401aa6c207858ec58fdffbc5131911b116418c7","src/vxworks.rs":"a5aa0e40f890e0f35626458bb656a3340b8af3111e4bacd2e12505a8d50a3505","src/wasi.rs":"3413e5a391b156f5d05600f4651f7f8eb4df2c8984fca7766ca50c0cfe0b2e9c","src/wasm-bindgen.rs":"0648388724c46697a9b3c654b8d931b2bf187a3193ca1888221d4529f764e376","src/windows.rs":"39dfae2814d958993619c3654bb39745de897971aea7a414fa32f90770850ce2","src/windows_uwp.rs":"672f41a0fac79a71bfaaecad59826c948b8538f69a0133ab1c09a1865ecd6114"},"package":"ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4"}
\ No newline at end of file
+{"files":{"CHANGELOG.md":"4a5b61c82668507beffc7ad33f602257013263d7847cf17a246ef1128ba27950","Cargo.toml":"b59322815506cf16acd6e0cbe2634dec1be0886e686b51fa5cdf5a5ac9fdcf32","LICENSE-APACHE":"aaff376532ea30a0cd5330b9502ad4a4c8bf769c539c87ffe78819d188a18ebf","LICENSE-MIT":"209fbbe0ad52d9235e37badf9cadfe4dbdc87203179c0899e738b39ade42177b","README.md":"e0bacefbe4310c23578c65926bda6e4318750f6718bb6b97ff9a4fa9056af6a6","benches/mod.rs":"5495735ff210a50cab23c2cc84191ed910af7c30395a3d9d6095b722765b3864","build.rs":"90355b5e76dedd97d604cd83b4a0a5ab074bbd4dde9632ee2b56c87c175b1e14","src/bsd_arandom.rs":"d2ee195acd80c7d1364a369ad0d2dad46f5f9f973f9d3960367413fd87acfcd6","src/cloudabi.rs":"9201af65a607587aa8615ec92cfab9d176f4199f6799dad9ca743c51d175028b","src/custom.rs":"f75ef80ec024fe3c97c7faff79de9f7d457993ed3c5f69f21593e140c8b62790","src/error.rs":"f40aa6cb36bc024285dc2e40349fdd3754db949a307ec73831ec253549d2b0a3","src/error_impls.rs":"733ed75ab89a9d0d5a7cc7abd85f31a23d772ea9c1e7c10def1477207d19fd8b","src/fuchsia.rs":"470d8509deb5b06fa6417f294c0a49e0e35a580249a5d8944c3be5aa746f64ea","src/ios.rs":"cc46ee9c48ab746d2af342a242e383b8de840045d3f52fd77ee337161367a1a1","src/lib.rs":"6aff4b429e4b1a07aad2ab7148d7cc9d0987b230597649af42041508320592e0","src/linux_android.rs":"39cb80999c8534145240a350976d261b8924436bf9a4563960c7bd8c2c83c773","src/macos.rs":"b692f2fcc2319a5195f47751d5bd7dd87c7c24a61d14fa4e3dbc992ae66212b7","src/openbsd.rs":"066b2dd395c190444a658bb0b52a052eabbd68ea5a534fb729c7e5373abc0a6a","src/rdrand.rs":"79d23183b1905d61bd9df9729dc798505a2ed750d3339e342ab144e1709827e4","src/solaris_illumos.rs":"9c7004446fabe5a7a21c73d5a65d7e2115b5bd1d1dbb735c984cab3dba239785","src/stdweb.rs":"f140081e47cfbb61937212e7840391bce5adf7829039d732d62b82a19e567dfa","src/test_common.rs":"895d71c06722e3a6f365999d29430f37f571aeb1eb4a525777b760005c9818be","src/test_rdrand.rs":"8c8df6de836463a41808396016428bf0a2a69c715ae96e7e0e7598fcea61ace8","src/use_file.rs":"c9fe635a83614be6f303e40f98b8e678c36ac6d9724b024430d3ea1ad1510add","src/util.rs":"da6964dc1523f1cb8d26365fa6a8ece46360587e6974931624b271f0c72cda8b","src/util_libc.rs":"c602b47e2958fa94443b3690faddf52a8c545689d18579c86dd8a07927c145b1","src/vxworks.rs":"a5aa0e40f890e0f35626458bb656a3340b8af3111e4bacd2e12505a8d50a3505","src/wasi.rs":"3413e5a391b156f5d05600f4651f7f8eb4df2c8984fca7766ca50c0cfe0b2e9c","src/wasm-bindgen.rs":"0648388724c46697a9b3c654b8d931b2bf187a3193ca1888221d4529f764e376","src/windows.rs":"39dfae2814d958993619c3654bb39745de897971aea7a414fa32f90770850ce2","src/windows_uwp.rs":"672f41a0fac79a71bfaaecad59826c948b8538f69a0133ab1c09a1865ecd6114"},"package":"ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4"}
--- a/vendor/getrandom-0.2.0/src/util_libc.rs
+++ b/vendor/getrandom-0.2.0/src/util_libc.rs
@@ -97,7 +97,7 @@ impl Weak {
}
cfg_if! {
- if #[cfg(any(target_os = "linux", target_os = "emscripten"))] {
+ if #[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "emscripten"))] {
use libc::open64 as open;
} else {
use libc::open;