Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose IP_PKTINFO Control Message on Android and iOS #1265

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

bltavares
Copy link
Contributor

@bltavares bltavares commented Jun 30, 2020

The commit #1222 added the very
useful Ipv4PktInfo to allow sendmsg to define the origin of the ip.

Unfortunattely, it didn't add the struct to Android target devices as
well. This commit adds the target_os = "android" and target_os =" ios" checks on the same
place to allow the compilation to work for the following archs tested:

  • cross build --target aarch64-linux-android
  • cross build --target x86_64-linux-android
  • cross build --target armv7-linux-androideabi
  • cross build --target aarch64-apple-ios
  • cross build --target x86_64-apple-ios

@bltavares bltavares changed the title Expose IP_PKTINFO Control Message on Android Expose IP_PKTINFO Control Message on Android and iOS Jun 30, 2020
@asomers
Copy link
Member

asomers commented Jun 30, 2020

A nice, simple change. Could you please add a CHANGELOG entry, too?

@bltavares
Copy link
Contributor Author

Sure thing :)

@asomers
Copy link
Member

asomers commented Jul 3, 2020

Only one more problem: you'll have to rebase to fix the test failure.

The commit nix-rust#1222 added the very
useful Ipv4PktInfo to allow `sendmsg` to define the origin of the ip.

Unfortunattely, it didn't add the struct to Android target devices as
well. This commit adds the `target_os = "android"` checks on the same
place to allow the compilation to work for the following archs tested:

- `cross build --target aarch64-linux-android`
- `cross build --target x86_64-linux-android`
- `cross build --target armv7-linux-androideabi`

Also introduces iOS to allow using on libs for those platforms
@bltavares
Copy link
Contributor Author

Sure thing - rebased and squashed all into a single commit

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 7, 2020

Build succeeded:

@bors bors bot merged commit 4b6b14a into nix-rust:master Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants