Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
19
third-party/vendor/nix/test/test_net.rs
vendored
Normal file
19
third-party/vendor/nix/test/test_net.rs
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use nix::net::if_::*;
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "linux"))]
|
||||
const LOOPBACK: &[u8] = b"lo";
|
||||
|
||||
#[cfg(not(any(
|
||||
target_os = "android",
|
||||
target_os = "linux",
|
||||
target_os = "haiku"
|
||||
)))]
|
||||
const LOOPBACK: &[u8] = b"lo0";
|
||||
|
||||
#[cfg(target_os = "haiku")]
|
||||
const LOOPBACK: &[u8] = b"loop";
|
||||
|
||||
#[test]
|
||||
fn test_if_nametoindex() {
|
||||
if_nametoindex(LOOPBACK).expect("assertion failed");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue