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

build: avoid getifaddrs when unavailable #14127

Merged
merged 1 commit into from Sep 10, 2018

Conversation

Projects
None yet
5 participants
@greenaddress
Copy link
Contributor

commented Sep 1, 2018

These changes from @theuni help building when targeting platforms that don't always have getifaddrs available like Android < 24

AC_CHECK_DECLS([getifaddrs, freeifaddrs],,,
[#include <sys/types.h>
#include <ifaddrs.h>]
)

This comment has been minimized.

Copy link
@Empact

Empact Sep 1, 2018

Member

Seems a bit simpler overall to add ifaddrs.h to AC_CHECK_HEADERS above, as it seems android does not include the header at all, and switch on HAVE_SYS_TYPES_H and HAVE_IFADDERS_H

This comment has been minimized.

Copy link
@greenaddress

greenaddress Sep 2, 2018

Author Contributor

android has them but not in all versions.

Only from android 24 onwards

see https://android.googlesource.com/platform/prebuilts/ndk/+/dev/platform/sysroot/usr/include/ifaddrs.h

@Empact

This comment has been minimized.

Copy link
Member

commented Sep 1, 2018

Should we also guard the includes?

@laanwj

This comment has been minimized.

Copy link
Member

commented Sep 1, 2018

concept ACK

thanks for starting to upstream android stuff

@fanquake fanquake requested a review from theuni Sep 2, 2018

@fanquake

This comment has been minimized.

Copy link
Member

commented Sep 2, 2018

Concept ACK

If anyone's interested in the Android work being done by @greenaddress, there's a fair bit of discussion in #11844.

@bitcoin bitcoin deleted a comment from PrinceKK300188 Sep 9, 2018

@laanwj

This comment has been minimized.

Copy link
Member

commented Sep 10, 2018

utACK 9256f7d

@laanwj laanwj merged commit 9256f7d into bitcoin:master Sep 10, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Sep 10, 2018

Merge #14127: build: avoid getifaddrs when unavailable
9256f7d build: avoid getifaddrs when unavailable (Cory Fields)

Pull request description:

  These changes from @theuni help building when targeting platforms that don't always have getifaddrs available like Android < 24

Tree-SHA512: dbfeb83297bd6f00b7991f53eef8a04948d2d739bf47c0524d9ae5335b843b8a5c06ff98c109fe5e6192665e6d0cf58700b8aa7e2a0b410281d3c052881973ff

@greenaddress greenaddress deleted the greenaddress:avoid_unavailable_getifaddrs branch Sep 10, 2018

@theuni

This comment has been minimized.

Copy link
Member

commented Sep 17, 2018

Sorry for missing this while I was away. Post-merge utACK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.