Skip to content

Commit

Permalink
Merge #1077
Browse files Browse the repository at this point in the history
1077: ifaddrs: add ifaddrs support for android r=asomers a=posborne

Support under bionic/android is the same as under Linux for what is exposed
by this code.

Co-authored-by: Paul Osborne <osbpau@gmail.com>
  • Loading branch information
bors[bot] and posborne committed Jun 7, 2019
2 parents 5a2586b + 80b85fb commit 83407c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#1079](https://github.com/nix-rust/nix/pull/1079))

### Changed
- Support for `ifaddrs` now present when building for Android.
([#1077](https://github.com/nix-rust/nix/pull/1077))

### Fixed
### Removed

Expand Down
2 changes: 1 addition & 1 deletion src/ifaddrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct InterfaceAddress {
}

cfg_if! {
if #[cfg(any(target_os = "emscripten", target_os = "fuchsia", target_os = "linux"))] {
if #[cfg(any(target_os = "android", target_os = "emscripten", target_os = "fuchsia", target_os = "linux"))] {
fn get_ifu_from_sockaddr(info: &libc::ifaddrs) -> *const libc::sockaddr {
info.ifa_ifu
}
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ pub mod errno;
pub mod features;
pub mod fcntl;
#[deny(missing_docs)]
#[cfg(any(target_os = "dragonfly",
#[cfg(any(target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "ios",
target_os = "linux",
Expand Down

0 comments on commit 83407c5

Please sign in to comment.