build: link against -lsocket if required for *ifaddrs #21486

pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:use_freeifaddrs_only_when_available changing 4 files +43 −3
  1. fanquake commented at 9:59 am on March 20, 2021: member
    Fixes #21485 by linking against -lsocket when it’s required for using *ifaddrs functions.
  2. fanquake added the label Utils/log/libs on Mar 20, 2021
  3. fanquake force-pushed on Mar 21, 2021
  4. fanquake force-pushed on Mar 26, 2021
  5. fanquake renamed this:
    rand: only try and use freeifaddrs if it's available
    builds: link against -lsocket if required for *ifaddrs
    on Mar 27, 2021
  6. fanquake renamed this:
    builds: link against -lsocket if required for *ifaddrs
    build: link against -lsocket if required for *ifaddrs
    on Mar 27, 2021
  7. fanquake added the label Build system on Mar 27, 2021
  8. rand: only try and use freeifaddrs if available 87deac66aa
  9. build: check if -lsocket is required with *ifaddrs 879215e665
  10. net: add ifaddrs.h include 4783115fd4
  11. fanquake force-pushed on Mar 29, 2021
  12. laanwj commented at 12:57 pm on March 30, 2021: member
    Code review ACK 4783115fd4cccb46a7f8c592b34fa7c094c29410
  13. glozow commented at 1:22 am on March 31, 2021: member
    It Works On My Machine ™
  14. hebasto approved
  15. hebasto commented at 2:01 am on March 31, 2021: member

    ACK 4783115fd4cccb46a7f8c592b34fa7c094c29410, I have reviewed the code and it looks OK, I agree it can be merged.

    Did not test it on Illumos/SmartOS.

    The ./configure output diff:

    0 checking sys/resources.h presence... no
    1 checking for sys/resources.h... no
    2 checking whether getifaddrs is declared... yes
    3+checking whether ifaddrs funcs can be used without link library... yes
    4 checking whether freeifaddrs is declared... yes
    5+checking whether ifaddrs funcs can be used without link library... yes
    6 checking whether strnlen is declared... yes
    7 checking whether fork is declared... yes
    8 checking whether setsid is declared... yes
    

    It seems we could have -lsocket twice in the LIBS :)

  16. fanquake merged this on Mar 31, 2021
  17. fanquake closed this on Mar 31, 2021

  18. fanquake added the label Needs backport (0.21) on Mar 31, 2021
  19. sidhujag referenced this in commit 0fccae38e3 on Mar 31, 2021
  20. fanquake deleted the branch on Apr 6, 2021
  21. fanquake referenced this in commit e99d6d0c7c on Apr 6, 2021
  22. fanquake referenced this in commit f6896dfde7 on Apr 6, 2021
  23. fanquake referenced this in commit 1a9a2cb7dc on Apr 6, 2021
  24. fanquake removed the label Needs backport (0.21) on Apr 6, 2021
  25. fanquake commented at 9:51 am on April 6, 2021: member
    Being backported in #21616.
  26. MarcoFalke referenced this in commit 0b9a046c1a on Apr 7, 2021
  27. random-zebra referenced this in commit 93f43f0f81 on Apr 14, 2021
  28. PastaPastaPasta referenced this in commit e8b06b328c on Jul 17, 2022
  29. DrahtBot locked this on Aug 18, 2022

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: 2024-11-21 18:12 UTC

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