We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aa4e1b5 + 0a5dcf0 commit 9f99d74Copy full SHA for 9f99d74
src/unix/mod.rs
@@ -129,6 +129,8 @@ pub const POLLERR: ::c_short = 0x8;
129
pub const POLLHUP: ::c_short = 0x10;
130
pub const POLLNVAL: ::c_short = 0x20;
131
132
+pub const IF_NAMESIZE: ::size_t = 16;
133
+
134
cfg_if! {
135
if #[cfg(feature = "default")] {
136
// cargo build, don't pull in anything extra as the libstd dep
@@ -363,6 +365,7 @@ extern {
363
365
pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
364
366
367
pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
368
+ pub fn if_indextoname(ifindex: ::c_uint, ifname: *mut ::c_char) -> *mut ::c_char;
369
370
#[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")]
371
#[cfg_attr(target_os = "netbsd", link_name = "__lstat50")]
0 commit comments