Skip to content

Add rtnetlink.h, if_link.h, if_addr.h to Android #2830

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

Merged
merged 2 commits into from
Jun 22, 2022
Merged

Conversation

tiann
Copy link
Contributor

@tiann tiann commented Jun 21, 2022

Here is the NDK header:

rtnetlink.h
if_link.h
if_addr.h

It is the same with Linux header, so i copied it from:https://github.com/rust-lang/libc/blob/master/src/unix/linux_like/linux/mod.rs

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon.

Please see the contribution instructions for more information.

@JohnTitor
Copy link
Member

Could you squash commits into one?

@tiann tiann force-pushed the master branch 2 times, most recently from c5b5290 to 96c5d31 Compare June 21, 2022 14:34
@tiann
Copy link
Contributor Author

tiann commented Jun 21, 2022

I have updated the commit and force pushed

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Thanks!

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 21, 2022

📌 Commit 96c5d31 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Jun 21, 2022

⌛ Testing commit 96c5d31 with merge 1775087...

@bors
Copy link
Contributor

bors commented Jun 21, 2022

💔 Test failed - checks-actions

@tiann
Copy link
Contributor Author

tiann commented Jun 21, 2022

It seems that x86_64 header of NDK is different with aarch64, i will figure it out

@tiann
Copy link
Contributor Author

tiann commented Jun 21, 2022

There are two problems:

  1. if_addr.h header seems not included in x86 CI ? (I don't known how the CI generated the main.c, but i have checked the header, it is the same with aarch64...) All the IFA_* variable are not exist..
  2. the CI used ndk is ndk-21d, the header if_link.h doesn't contain: IFLA_PROP_LIST, IFLA_ALT_IFNAME, IFLA_PERM_ADDRESS, IFLA_PROTO_DOWN_REASON

So i remove the if_addr.h temporarily, and i remove the four IFLA_* variable. There are two things to do:

  1. upgrade the CI ndk toolchains.
  2. fix if_addr.h

But i think the upgrade may occur other issues, after i fixed it, i will make another PRs

@JohnTitor
Copy link
Member

You could tweak the test here to include additional headers:

fn test_android(target: &str) {

@tiann
Copy link
Contributor Author

tiann commented Jun 21, 2022

You could tweak the test here to include additional headers:

fn test_android(target: &str) {

Thank you, i have updated the header

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 22, 2022

📌 Commit 15e132b has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Jun 22, 2022

⌛ Testing commit 15e132b with merge c6d01ce...

@bors
Copy link
Contributor

bors commented Jun 22, 2022

💔 Test failed - checks-actions

@tiann
Copy link
Contributor Author

tiann commented Jun 22, 2022

I checked the header, these fields are not exist :

RTMSG_NEWRULE                                                
RTMSG_DELRULE                                             
RTMSG_CONTROL                                            
RTMSG_AR_FAILED                                               
MAX_ADDR_LEN                                                  
ARPD_UPDATE                                                   
ARPD_LOOKUP                                                   
ARPD_FLUSH                                                   
ATF_MAGIC

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 22, 2022

📌 Commit f5b4740 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Jun 22, 2022

⌛ Testing commit f5b4740 with merge 061f3b0...

@bors
Copy link
Contributor

bors commented Jun 22, 2022

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing 061f3b0 to master...

@bors bors merged commit 061f3b0 into rust-lang:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants