On 12/21/18 10:48 AM, John Paul Adrian Glaubitz wrote: > The patch contains a bogus hunk at the bottom, cleaned up patch attached.
And this time, I messed up the formatting. *sigh* Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Description: Use correct fnctl constants for sparc64 Author: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> Bug: https://github.com/rust-lang/rust/issues/57007 Last-Update: 2018-12-21 Index: rustc-1.31.0+dfsg1/src/librustc_data_structures/flock.rs =================================================================== --- rustc-1.31.0+dfsg1.orig/src/librustc_data_structures/flock.rs +++ rustc-1.31.0+dfsg1/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")]