summaryrefslogtreecommitdiff
path: root/test/sys/test_termios.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-08-23 17:59:34 -0700
committerBryant Mairs <bryant@mai.rs>2017-08-29 18:47:40 -0700
commit2d4b13715aa46741c7cd5d2e4461eb0c44f8d424 (patch)
treeacfbb21cff8d9e9ed2393a9af6789c97ec13638a /test/sys/test_termios.rs
parent28c5b4a41a45a3ee5ec6c88927388b208f0449c3 (diff)
downloadnix-2d4b13715aa46741c7cd5d2e4461eb0c44f8d424.zip
Use upstream libc definitions for fcntl FFI
Diffstat (limited to 'test/sys/test_termios.rs')
-rw-r--r--test/sys/test_termios.rs2
1 files changed, 1 insertions, 1 deletions
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