From ee19b8a9bb2316d165deae8730107116a96825a4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 8 Apr 2022 15:01:10 -0700 Subject: [PATCH] Define `TCSANOW` et al for MIPS. Define `TCSANOW`, `TCSADRAIN`, and `TCSAFLUSH` for MIPS, since MIPS defines these differently from all other architectures, and in a way that bindgen doesn't support. --- gen/modules/general.h | 7 +++++++ src/mips/general.rs | 3 +++ src/mips64/general.rs | 3 +++ 3 files changed, 13 insertions(+) diff --git a/gen/modules/general.h b/gen/modules/general.h index f1e661e..3faa358 100644 --- a/gen/modules/general.h +++ b/gen/modules/general.h @@ -331,4 +331,11 @@ struct mmsghdr { #if defined(__mips) #define POLLWRNORM 0x4 + +#undef TCSANOW +#undef TCSADRAIN +#undef TCSAFLUSH +#define TCSANOW 0x540e +#define TCSADRAIN 0x540f +#define TCSAFLUSH 0x5410 #endif diff --git a/src/mips/general.rs b/src/mips/general.rs index 760caa3..dee2707 100644 --- a/src/mips/general.rs +++ b/src/mips/general.rs @@ -2457,6 +2457,9 @@ pub const UFFDIO_COPY_MODE_DONTWAKE: u32 = 1; pub const UFFDIO_COPY_MODE_WP: u32 = 2; pub const UFFDIO_ZEROPAGE_MODE_DONTWAKE: u32 = 1; pub const POLLWRNORM: u32 = 4; +pub const TCSANOW: u32 = 21518; +pub const TCSADRAIN: u32 = 21519; +pub const TCSAFLUSH: u32 = 21520; pub type size_t = crate::ctypes::c_uint; pub type ssize_t = crate::ctypes::c_int; pub type __s8 = crate::ctypes::c_schar; diff --git a/src/mips64/general.rs b/src/mips64/general.rs index 1626659..c04096b 100644 --- a/src/mips64/general.rs +++ b/src/mips64/general.rs @@ -2395,6 +2395,9 @@ pub const UFFDIO_COPY_MODE_DONTWAKE: u32 = 1; pub const UFFDIO_COPY_MODE_WP: u32 = 2; pub const UFFDIO_ZEROPAGE_MODE_DONTWAKE: u32 = 1; pub const POLLWRNORM: u32 = 4; +pub const TCSANOW: u32 = 21518; +pub const TCSADRAIN: u32 = 21519; +pub const TCSAFLUSH: u32 = 21520; pub type size_t = crate::ctypes::c_ulong; pub type ssize_t = crate::ctypes::c_long; pub type __s8 = crate::ctypes::c_schar;