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 cross-referenced this on Mar 20, 2021 from issue (v0.20.1) Not compiling on Illumos/SmartOS by kayront
  4. fanquake force-pushed on Mar 21, 2021
  5. fanquake force-pushed on Mar 26, 2021
  6. 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
  7. fanquake renamed this:
    builds: link against -lsocket if required for *ifaddrs
    build: link against -lsocket if required for *ifaddrs
    on Mar 27, 2021
  8. fanquake added the label Build system on Mar 27, 2021
  9. rand: only try and use freeifaddrs if available 87deac66aa
  10. build: check if -lsocket is required with *ifaddrs 879215e665
  11. net: add ifaddrs.h include 4783115fd4
  12. fanquake force-pushed on Mar 29, 2021
  13. laanwj commented at 12:57 PM on March 30, 2021: member

    Code review ACK 4783115fd4cccb46a7f8c592b34fa7c094c29410

  14. glozow commented at 1:22 AM on March 31, 2021: member

    It Works On My Machine ™

  15. hebasto approved
  16. 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:

     checking sys/resources.h presence... no
     checking for sys/resources.h... no
     checking whether getifaddrs is declared... yes
    +checking whether ifaddrs funcs can be used without link library... yes
     checking whether freeifaddrs is declared... yes
    +checking whether ifaddrs funcs can be used without link library... yes
     checking whether strnlen is declared... yes
     checking whether fork is declared... yes
     checking whether setsid is declared... yes
    

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

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

  19. fanquake added the label Needs backport (0.21) on Mar 31, 2021
  20. sidhujag referenced this in commit 0fccae38e3 on Mar 31, 2021
  21. fanquake deleted the branch on Apr 6, 2021
  22. fanquake referenced this in commit e99d6d0c7c on Apr 6, 2021
  23. fanquake referenced this in commit f6896dfde7 on Apr 6, 2021
  24. fanquake referenced this in commit 1a9a2cb7dc on Apr 6, 2021
  25. fanquake cross-referenced this on Apr 6, 2021 from issue [0.21] build: link against -lsocket if required for *ifaddrs by fanquake
  26. fanquake removed the label Needs backport (0.21) on Apr 6, 2021
  27. fanquake commented at 9:51 AM on April 6, 2021: member

    Being backported in #21616.

  28. MarcoFalke referenced this in commit 0b9a046c1a on Apr 7, 2021
  29. Fuzzbawls cross-referenced this on Apr 14, 2021 from issue [Refactor] Update RNG code from upstream by Fuzzbawls
  30. random-zebra referenced this in commit 93f43f0f81 on Apr 14, 2021
  31. PastaPastaPasta referenced this in commit e8b06b328c on Jul 17, 2022
  32. bitcoin 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: 2026-05-20 06:54 UTC