build: avoid getifaddrs when unavailable #14127

pull greenaddress wants to merge 1 commits into bitcoin:master from greenaddress:avoid_unavailable_getifaddrs changing 2 files +5 −1
  1. greenaddress commented at 1:28 PM on September 1, 2018: contributor

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

  2. build: avoid getifaddrs when unavailable 9256f7d13f
  3. fanquake added the label Build system on Sep 1, 2018
  4. in configure.ac:733 in 9256f7d13f
     726 | @@ -727,6 +727,10 @@ fi
     727 |  
     728 |  AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
     729 |  
     730 | +AC_CHECK_DECLS([getifaddrs, freeifaddrs],,,
     731 | +    [#include <sys/types.h>
     732 | +    #include <ifaddrs.h>]
     733 | +)
    


    Empact commented at 7:47 PM on September 1, 2018:

    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


    greenaddress commented at 8:19 PM on September 2, 2018:

    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

  5. Empact commented at 7:47 PM on September 1, 2018: member

    Should we also guard the includes?

  6. laanwj commented at 11:21 PM on September 1, 2018: member

    concept ACK

    thanks for starting to upstream android stuff

  7. fanquake requested review from theuni on Sep 2, 2018
  8. fanquake commented at 6:01 AM on September 2, 2018: member

    Concept ACK

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

  9. sipa deleted a comment on Sep 9, 2018
  10. laanwj commented at 4:07 PM on September 10, 2018: member

    utACK 9256f7d13f5b68ebc2981e8f45777f4bdc43f1b3

  11. laanwj merged this on Sep 10, 2018
  12. laanwj closed this on Sep 10, 2018

  13. laanwj referenced this in commit 7c7bb6e772 on Sep 10, 2018
  14. greenaddress deleted the branch on Sep 10, 2018
  15. theuni commented at 6:20 PM on September 17, 2018: member

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

  16. random-zebra referenced this in commit 93f43f0f81 on Apr 14, 2021
  17. PastaPastaPasta referenced this in commit eae8c70e86 on Jun 27, 2021
  18. PastaPastaPasta referenced this in commit 068a4b08b1 on Jun 28, 2021
  19. PastaPastaPasta referenced this in commit c759dbfa1b on Jun 29, 2021
  20. PastaPastaPasta referenced this in commit deab1b0397 on Jul 1, 2021
  21. MarcoFalke locked this on Sep 8, 2021


theuni


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me