From 2d4b13715aa46741c7cd5d2e4461eb0c44f8d424 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Wed, 23 Aug 2017 17:59:34 -0700 Subject: Use upstream libc definitions for fcntl FFI --- test/sys/test_termios.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/sys/test_termios.rs b/test/sys/test_termios.rs index 2455a4e5..6640c3af 100644 --- a/test/sys/test_termios.rs +++ b/test/sys/test_termios.rs @@ -116,7 +116,7 @@ fn test_local_flags() { // Set the master is in nonblocking mode or reading will never return. let flags = fcntl::fcntl(pty.master, fcntl::F_GETFL).unwrap(); - let new_flags = fcntl::OFlag::from_bits(flags).unwrap() | fcntl::O_NONBLOCK; + let new_flags = fcntl::OFlag::from_bits_truncate(flags) | fcntl::O_NONBLOCK; fcntl::fcntl(pty.master, fcntl::F_SETFL(new_flags)).unwrap(); // Write into the master -- cgit v1.2.3