Skip to content

Commit d15d92f

Browse files
committed
Rollup merge of rust-lang#25140 - kevinmehall:mips, r=steveklabnik
Building with `--target=mipsel-unknown-linux-gnu` currently results in the following errors, fixed by this PR: ``` rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/mipsel-unknown-linux-gnu/lib/libstd /vol/rust/src/libstd/os/linux/raw.rs:76:21: 76:28 error: use of undeclared type name `c_ulong` /vol/rust/src/libstd/os/linux/raw.rs:76 pub st_dev: c_ulong, ^~~~~~~ /vol/rust/src/libstd/os/linux/raw.rs:83:22: 83:29 error: use of undeclared type name `c_ulong` /vol/rust/src/libstd/os/linux/raw.rs:83 pub st_rdev: c_ulong, ^~~~~~~ /vol/rust/src/libstd/sys/common/net2.rs:210:52: 210:70 error: unresolved name `libc::TCP_KEEPIDLE` /vol/rust/src/libstd/sys/common/net2.rs:210 setsockopt(&self.inner, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, ```
2 parents c88485d + 6c6b200 commit d15d92f

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

src/liblibc/lib.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,6 +3624,30 @@ pub mod consts {
36243624
pub const IPV6_DROP_MEMBERSHIP: c_int = 21;
36253625

36263626
pub const TCP_NODELAY: c_int = 1;
3627+
pub const TCP_MAXSEG: c_int = 2;
3628+
pub const TCP_CORK: c_int = 3;
3629+
pub const TCP_KEEPIDLE: c_int = 4;
3630+
pub const TCP_KEEPINTVL: c_int = 5;
3631+
pub const TCP_KEEPCNT: c_int = 6;
3632+
pub const TCP_SYNCNT: c_int = 7;
3633+
pub const TCP_LINGER2: c_int = 8;
3634+
pub const TCP_DEFER_ACCEPT: c_int = 9;
3635+
pub const TCP_WINDOW_CLAMP: c_int = 10;
3636+
pub const TCP_INFO: c_int = 11;
3637+
pub const TCP_QUICKACK: c_int = 12;
3638+
pub const TCP_CONGESTION: c_int = 13;
3639+
pub const TCP_MD5SIG: c_int = 14;
3640+
pub const TCP_COOKIE_TRANSACTIONS: c_int = 15;
3641+
pub const TCP_THIN_LINEAR_TIMEOUTS: c_int = 16;
3642+
pub const TCP_THIN_DUPACK: c_int = 17;
3643+
pub const TCP_USER_TIMEOUT: c_int = 18;
3644+
pub const TCP_REPAIR: c_int = 19;
3645+
pub const TCP_REPAIR_QUEUE: c_int = 20;
3646+
pub const TCP_QUEUE_SEQ: c_int = 21;
3647+
pub const TCP_REPAIR_OPTIONS: c_int = 22;
3648+
pub const TCP_FASTOPEN: c_int = 23;
3649+
pub const TCP_TIMESTAMP: c_int = 24;
3650+
36273651
pub const SOL_SOCKET: c_int = 65535;
36283652

36293653
pub const SO_DEBUG: c_int = 0x0001;

src/libstd/os/linux/raw.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ mod arch {
6060
#[cfg(any(target_arch = "mips",
6161
target_arch = "mipsel"))]
6262
mod arch {
63-
use super::{dev_t, mode_t};
64-
use os::raw::c_long;
63+
use super::mode_t;
64+
use os::raw::{c_long, c_ulong};
6565
use os::unix::raw::{gid_t, uid_t};
6666

6767
pub type blkcnt_t = i32;

0 commit comments

Comments
 (0)