Skip to content

Commit e89701d

Browse files
committed
haiku: add missing ifaddrs definitions
1 parent d5401c9 commit e89701d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/unix/haiku/mod.rs

+12
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ s! {
102102
pub ai_next: *mut addrinfo,
103103
}
104104

105+
pub struct ifaddrs {
106+
pub ifa_next: *mut ifaddrs,
107+
pub ifa_name: *mut ::c_char,
108+
pub ifa_flags: ::c_uint,
109+
pub ifa_addr: *mut ::sockaddr,
110+
pub ifa_netmask: *mut ::sockaddr,
111+
pub ifa_dstaddr: *mut ::sockaddr,
112+
pub ida_data: *mut ::c_void,
113+
}
114+
105115
pub struct fd_set {
106116
// size for 1024 bits, and a fd_mask with size u32
107117
fds_bits: [fd_mask; 32],
@@ -1465,6 +1475,8 @@ extern "C" {
14651475
pub fn labs(i: ::c_long) -> ::c_long;
14661476
pub fn rand() -> ::c_int;
14671477
pub fn srand(seed: ::c_uint);
1478+
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
1479+
pub fn freeifaddrs(ifa: *mut ::ifaddrs);
14681480
}
14691481

14701482
#[link(name = "bsd")]

0 commit comments

Comments
 (0)