From: Debian Rust Maintainers Date: Sun, 17 Mar 2019 23:40:05 +0000 (+0000) Subject: d-sparc64-fix-fnctls X-Git-Tag: archive/raspbian/1.32.0+dfsg1-3+rpi1^2~13 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=443080cca52f22a7436b856614a316fdd1a625eb;p=rustc.git d-sparc64-fix-fnctls Gbp-Pq: Name d-sparc64-fix-fnctls.patch --- diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs index 86e48e2162..66bc6a4a54 100644 --- a/src/librustc_data_structures/flock.rs +++ b/src/librustc_data_structures/flock.rs @@ -42,11 +42,21 @@ cfg_if! { pub l_sysid: libc::c_int, } - pub const F_RDLCK: libc::c_short = 0; - pub const F_WRLCK: libc::c_short = 1; - pub const F_UNLCK: libc::c_short = 2; - pub const F_SETLK: libc::c_int = 6; - pub const F_SETLKW: libc::c_int = 7; + cfg_if! { + if #[cfg(target_arch = "sparc64")] { + pub const F_RDLCK: libc::c_short = 1; + pub const F_WRLCK: libc::c_short = 2; + pub const F_UNLCK: libc::c_short = 3; + pub const F_SETLK: libc::c_int = 8; + pub const F_SETLKW: libc::c_int = 9; + } else { + pub const F_RDLCK: libc::c_short = 0; + pub const F_WRLCK: libc::c_short = 1; + pub const F_UNLCK: libc::c_short = 2; + pub const F_SETLK: libc::c_int = 6; + pub const F_SETLKW: libc::c_int = 7; + } + } } #[cfg(target_os = "freebsd")]