On 12/21/18 10:22 AM, John Paul Adrian Glaubitz wrote:
> The attached patch uses the correct fnctl constants for sparc64 to fix
> the problem. I haven't checked the other architectures but it may be
> worth to verify that the other non-x86 architectures are using the correct
> constansts as well.

The patch contains a bogus hunk at the bottom, cleaned up patch attached.

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

--- 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,18 @@ cfg_if! {
                 pub l_sysid: libc::c_int,
             }
 
+	    #[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;	    
+	    #[cfg(not(target_arch = "sparc64"))]
             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")]

Reply via email to