Skip to content

Commit 5698215

Browse files
authored
Merge pull request #4518 from Gelbpunkt/musl-powerpc-termios
musl: powerpc(64): Decommonize termios definitions
2 parents 3f8a0e3 + 0dfd754 commit 5698215

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

src/unix/linux_like/linux/musl/b32/powerpc.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ use crate::prelude::*;
44
pub type wchar_t = i32;
55

66
s! {
7+
pub struct termios {
8+
pub c_iflag: crate::tcflag_t,
9+
pub c_oflag: crate::tcflag_t,
10+
pub c_cflag: crate::tcflag_t,
11+
pub c_lflag: crate::tcflag_t,
12+
pub c_cc: [crate::cc_t; crate::NCCS],
13+
pub c_line: crate::cc_t,
14+
pub __c_ispeed: crate::speed_t,
15+
pub __c_ospeed: crate::speed_t,
16+
}
17+
718
pub struct stat {
819
pub st_dev: crate::dev_t,
920
pub st_ino: crate::ino_t,

src/unix/linux_like/linux/musl/b64/powerpc64.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ pub type nlink_t = u64;
88
pub type blksize_t = c_long;
99

1010
s! {
11+
pub struct termios {
12+
pub c_iflag: crate::tcflag_t,
13+
pub c_oflag: crate::tcflag_t,
14+
pub c_cflag: crate::tcflag_t,
15+
pub c_lflag: crate::tcflag_t,
16+
pub c_cc: [crate::cc_t; crate::NCCS],
17+
pub c_line: crate::cc_t,
18+
pub __c_ispeed: crate::speed_t,
19+
pub __c_ospeed: crate::speed_t,
20+
}
21+
1122
pub struct stat {
1223
pub st_dev: crate::dev_t,
1324
pub st_ino: crate::ino_t,

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ s! {
203203
__f_reserved: [c_int; 6],
204204
}
205205

206+
// PowerPC implementations are special, see the subfolders
207+
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
206208
pub struct termios {
207209
pub c_iflag: crate::tcflag_t,
208210
pub c_oflag: crate::tcflag_t,

0 commit comments

Comments
 (0)