Skip to content

Commit 858092c

Browse files
authored
Auto merge of #410 - kallisti5:master, r=alexcrichton
Add support for Haiku x86 and x86_64 * Rework of original patches from Niels Sascha Reedijk that include style and build fixes for libc master
2 parents fd06ed7 + a3ff955 commit 858092c

File tree

8 files changed

+734
-2
lines changed

8 files changed

+734
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,6 @@ The following may be supported, but are not guaranteed to always work:
132132
* `i686-unknown-freebsd`
133133
* [`x86_64-unknown-bitrig`](https://doc.rust-lang.org/libc/x86_64-unknown-bitrig/libc/)
134134
* [`x86_64-unknown-dragonfly`](https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly/libc/)
135+
* `i686-unknown-haiku`
136+
* `x86_64-unknown-haiku`
135137
* [`x86_64-unknown-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)

src/unix/bsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ f! {
321321
}
322322

323323
extern {
324+
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
325+
pub fn freeifaddrs(ifa: *mut ::ifaddrs);
324326
pub fn setgroups(ngroups: ::c_int,
325327
ptr: *const ::gid_t) -> ::c_int;
326328
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;

src/unix/haiku/b32.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub type c_long = i32;
2+
pub type c_ulong = u32;
3+
4+
// intentionally not public, only used for fd_set
5+
const ULONG_SIZE: usize = 32;

src/unix/haiku/b64.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub type c_ulong = u64;
2+
pub type c_long = i64;
3+
4+
// intentionally not public, only used for fd_set
5+
const ULONG_SIZE: usize = 64;

0 commit comments

Comments
 (0)