Skip to content

Commit

Permalink
More cfg.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Sep 27, 2023
1 parent ff13f66 commit 3f1a070
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/net/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,12 @@ fn test_sockopts_ipv4() {
))]
{
assert_eq!(sockopt::get_ip_tos(&s).unwrap(), 0);
sockopt::set_ip_tos(&s, libc::IPTOS_THROUGHPUT).unwrap();
assert_eq!(sockopt::get_ip_tos(&s).unwrap(), libc::IPTOS_THROUGHPUT);

#[cfg(any(linux_like, target_os = "aix", target_os = "nto"))]
{
sockopt::set_ip_tos(&s, libc::IPTOS_THROUGHPUT).unwrap();
assert_eq!(sockopt::get_ip_tos(&s).unwrap(), libc::IPTOS_THROUGHPUT);
}
}

// Check the initial value of IP RECVTOS, set it, and check it.
Expand Down

0 comments on commit 3f1a070

Please sign in to comment.