Skip to content

Commit

Permalink
Haiku fixes for IP_RECVTOS and IP_TOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Begasus authored and Thomasdezeeuw committed Nov 1, 2023
1 parent 328dac6 commit 5c8bf8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ impl Socket {
target_os = "redox",
target_os = "solaris",
target_os = "illumos",
target_os = "haiku",
)))]
pub fn set_tos(&self, tos: u32) -> io::Result<()> {
unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS, tos as c_int) }
Expand All @@ -1505,6 +1506,7 @@ impl Socket {
target_os = "redox",
target_os = "solaris",
target_os = "illumos",
target_os = "haiku",
)))]
pub fn tos(&self) -> io::Result<u32> {
unsafe {
Expand Down
1 change: 1 addition & 0 deletions src/sys/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ pub(crate) use libc::IP_RECVTOS;
target_os = "fuchsia",
target_os = "redox",
target_os = "solaris",
target_os = "haiku",
target_os = "illumos",
)))]
pub(crate) use libc::IP_TOS;
Expand Down

0 comments on commit 5c8bf8c

Please sign in to comment.