summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/termios.rs2
-rw-r--r--src/sys/time.rs2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/sys/termios.rs b/src/sys/termios.rs
index b0286f51..0f1c9950 100644
--- a/src/sys/termios.rs
+++ b/src/sys/termios.rs
@@ -309,7 +309,7 @@ impl Termios {
let termios = *self.inner.borrow_mut();
self.input_flags = InputFlags::from_bits_truncate(termios.c_iflag);
self.output_flags = OutputFlags::from_bits_truncate(termios.c_oflag);
- self.control_flags = ControlFlags::from_bits_truncate(termios.c_cflag);
+ self.control_flags = ControlFlags::from_bits_retain(termios.c_cflag);
self.local_flags = LocalFlags::from_bits_truncate(termios.c_lflag);
self.control_chars = termios.c_cc;
#[cfg(any(
diff --git a/src/sys/time.rs b/src/sys/time.rs
index 30ee5fd1..a0160e21 100644
--- a/src/sys/time.rs
+++ b/src/sys/time.rs
@@ -91,6 +91,7 @@ pub(crate) mod timer {
#[cfg(any(target_os = "android", target_os = "linux"))]
bitflags! {
/// Flags that are used for arming the timer.
+ #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct TimerSetTimeFlags: libc::c_int {
const TFD_TIMER_ABSTIME = libc::TFD_TIMER_ABSTIME;
const TFD_TIMER_CANCEL_ON_SET = libc::TFD_TIMER_CANCEL_ON_SET;
@@ -104,6 +105,7 @@ pub(crate) mod timer {
))]
bitflags! {
/// Flags that are used for arming the timer.
+ #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct TimerSetTimeFlags: libc::c_int {
const TFD_TIMER_ABSTIME = libc::TIMER_ABSTIME;
}