Skip to content

Commit 1826597

Browse files
committed
Remove some ioctls from being defined for gnu/mips.
Seems like not all arches/c-libraries like having every ioctl defined. These ioctls were previously defined for musl, but not gnu. I similarly had to removed defining an ioctl for x86 that had not been previously defined. Maybe will run into more issues after this one. Maybe need to undefine this ioctol for all arches and not just mips. Plan to squash all commits once done.
1 parent d75d690 commit 1826597

File tree

1 file changed

+7
-2
lines changed
  • src/unix/linux_like/linux/arch/mips

1 file changed

+7
-2
lines changed

src/unix/linux_like/linux/arch/mips/mod.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ pub const TCGETS2: ::Ioctl = 0x4030542a;
155155
pub const TCSETS2: ::Ioctl = 0x8030542b;
156156
pub const TCSETSW2: ::Ioctl = 0x8030542c;
157157
pub const TCSETSF2: ::Ioctl = 0x8030542d;
158-
pub const TIOCGRS485: ::Ioctl = 0x4020542e;
159-
pub const TIOCSRS485: ::Ioctl = 0xc020542f;
160158
pub const TIOCGPTN: ::Ioctl = 0x40045430;
161159
pub const TIOCSPTLCK: ::Ioctl = 0x80045431;
162160
pub const TIOCGDEV: ::Ioctl = 0x40045432;
@@ -188,6 +186,13 @@ pub const TIOCGETP: ::Ioctl = 0x7408;
188186
pub const TIOCSETP: ::Ioctl = 0x7409;
189187
pub const TIOCSETN: ::Ioctl = 0x740a;
190188

189+
cfg_if! {
190+
if #[cfg(target_env = "musl")] {
191+
pub const TIOCGRS485: ::Ioctl = 0x4020542e;
192+
pub const TIOCSRS485: ::Ioctl = 0xc020542f;
193+
}
194+
}
195+
191196
pub const TIOCM_LE: ::c_int = 0x001;
192197
pub const TIOCM_DTR: ::c_int = 0x002;
193198
pub const TIOCM_RTS: ::c_int = 0x004;

0 commit comments

Comments
 (0)