[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#943984: rust-nix: Please include patch to add missing VMIN and VTIME on sparc64

Source: rust-nix
Severity: normal
Tags: patch upstream
User: debian-sparc@lists.debian.org
Usertags: sparc64


On sparc64, the definitions for VMIN and VTIME in sys:termios are missing
making rust-rustyline failing to build from source. The attached patch
fixes that by creating the aliases for VEOF<=>VMIN and VEOL<=>VTIME, I have
already included the patch in a manual build of rust-nix in Debian Ports
which is why the rust-rustyline package currently builds fine but will
break again the moment rust-nix would be updated again without the fix.

Thus, it would be nice if the patch could be included until the next fixed
version of nix is released upstream which includes the fixes:

> https://github.com/nix-rust/nix/pull/1151
> https://github.com/nix-rust/nix/pull/1150


 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Description: Add missing alias definitions for VMIN and VTIME on sparc64
 On sparc and sparc64, VMIN and VTIME in termios are defined as
 aliases of VEOF and VTIME respectively. Thus, in order to be able
 to use VMIN and VTIME in other packages like rustyline, we need to
 add this alias definitions in nix as well. Since enums cannot have
 the same numerical value defined twice, we use associated constants
 to define the aliases for VEOF and VEOL in SpecialCharacterIndices.
Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>


Forwarded: https://github.com/nix-rust/nix/pull/1151
Forwarded: https://github.com/nix-rust/nix/pull/1150
Last-Update: 2019-11-01

Index: rust-nix-0.15.0/src/sys/termios.rs
--- rust-nix-0.15.0.orig/src/sys/termios.rs
+++ rust-nix-0.15.0/src/sys/termios.rs
@@ -583,6 +583,13 @@ libc_enum! {
+impl SpecialCharacterIndices {
+    #[cfg(all(target_os = "linux", target_arch = "sparc64"))]
+    pub const VMIN: SpecialCharacterIndices = SpecialCharacterIndices::VEOF;
+    #[cfg(all(target_os = "linux", target_arch = "sparc64"))]
+    pub const VTIME: SpecialCharacterIndices = SpecialCharacterIndices::VEOL;
 pub use libc::NCCS;
 #[cfg(any(target_os = "dragonfly",
           target_os = "freebsd",

Reply to: