Skip to content
Snippets Groups Projects
Commit 0a5dcf02 authored by Kamal Marhubi's avatar Kamal Marhubi
Browse files

unix: Add if_indextoname and IF_NAMESIZE

parent aa4e1b58
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,8 @@ pub const POLLERR: ::c_short = 0x8;
pub const POLLHUP: ::c_short = 0x10;
pub const POLLNVAL: ::c_short = 0x20;
pub const IF_NAMESIZE: ::size_t = 16;
cfg_if! {
if #[cfg(feature = "default")] {
// cargo build, don't pull in anything extra as the libstd dep
......@@ -363,6 +365,7 @@ extern {
pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
pub fn if_indextoname(ifindex: ::c_uint, ifname: *mut ::c_char) -> *mut ::c_char;
#[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")]
#[cfg_attr(target_os = "netbsd", link_name = "__lstat50")]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment