Skip to content

Commit

Permalink
More fixes & bump libc
Browse files Browse the repository at this point in the history
  • Loading branch information
jD91mZM2 committed Jun 2, 2018
1 parent 823bb87 commit 92c1e42
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ features = ["handleapi", "ws2def", "ws2ipdef", "ws2tcpip", "minwindef"]

[target."cfg(any(unix, target_os = \"redox\"))".dependencies]
cfg-if = "0.1"
libc = { git = "https://github.com/rust-lang/libc", rev = "ad4d492" }
libc = "0.2.42"

[target."cfg(target_os = \"redox\")".dependencies]
redox_syscall = "0.1.38"
Expand Down
4 changes: 2 additions & 2 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,12 +829,12 @@ impl Type {

/// Type corresponding to `SOCK_SEQPACKET`
pub fn seqpacket() -> Type {
Type(c::SOCK_SEQPACKET)
Type(sys::SOCK_SEQPACKET)
}

/// Type corresponding to `SOCK_RAW`
pub fn raw() -> Type {
Type(c::SOCK_RAW)
Type(sys::SOCK_RAW)
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ pub const IPPROTO_ICMP: i32 = libc::IPPROTO_ICMP;
pub const IPPROTO_ICMPV6: i32 = libc::IPPROTO_ICMPV6;
pub const IPPROTO_TCP: i32 = libc::IPPROTO_TCP;
pub const IPPROTO_UDP: i32 = libc::IPPROTO_UDP;
pub const SOCK_SEQPACKET: i32 = libc::SOCK_SEQPACKET;
pub const SOCK_RAW: i32 = libc::SOCK_RAW;

#[macro_use]
#[cfg(target_os = "linux")]
Expand Down
2 changes: 2 additions & 0 deletions src/sys/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ pub const IPPROTO_ICMP: i32 = ws2def::IPPROTO_ICMP as i32;
pub const IPPROTO_ICMPV6: i32 = ws2def::IPPROTO_ICMPV6 as i32;
pub const IPPROTO_TCP: i32 = ws2def::IPPROTO_TCP as i32;
pub const IPPROTO_UDP: i32 = ws2def::IPPROTO_UDP as i32;
pub const SOCK_SEQPACKET: i32 = ws2def::SOCK_SEQPACKET as i32;
pub const SOCK_RAW: i32 = ws2def::SOCK_RAW as i32;

#[repr(C)]
struct tcp_keepalive {
Expand Down

0 comments on commit 92c1e42

Please sign in to comment.