Fixes #21485 by linking against -lsocket when it's required for using *ifaddrs functions.
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-
fanquake commented at 9:59 AM on March 20, 2021: member
- fanquake added the label Utils/log/libs on Mar 20, 2021
- fanquake force-pushed on Mar 21, 2021
- fanquake force-pushed on Mar 26, 2021
- 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 - fanquake renamed this:
builds: link against -lsocket if required for *ifaddrs
build: link against -lsocket if required for *ifaddrs
on Mar 27, 2021 - fanquake added the label Build system on Mar 27, 2021
-
rand: only try and use freeifaddrs if available 87deac66aa
-
build: check if -lsocket is required with *ifaddrs 879215e665
-
net: add ifaddrs.h include 4783115fd4
- fanquake force-pushed on Mar 29, 2021
-
laanwj commented at 12:57 PM on March 30, 2021: member
Code review ACK 4783115fd4cccb46a7f8c592b34fa7c094c29410
-
glozow commented at 1:22 AM on March 31, 2021: member
It Works On My Machine ™
- hebasto approved
-
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
./configureoutput 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... yesIt seems we could have
-lsockettwice in theLIBS:) - fanquake merged this on Mar 31, 2021
- fanquake closed this on Mar 31, 2021
- fanquake added the label Needs backport (0.21) on Mar 31, 2021
- sidhujag referenced this in commit 0fccae38e3 on Mar 31, 2021
- fanquake deleted the branch on Apr 6, 2021
- fanquake referenced this in commit e99d6d0c7c on Apr 6, 2021
- fanquake referenced this in commit f6896dfde7 on Apr 6, 2021
- fanquake referenced this in commit 1a9a2cb7dc on Apr 6, 2021
- fanquake removed the label Needs backport (0.21) on Apr 6, 2021
- MarcoFalke referenced this in commit 0b9a046c1a on Apr 7, 2021
- random-zebra referenced this in commit 93f43f0f81 on Apr 14, 2021
- PastaPastaPasta referenced this in commit e8b06b328c on Jul 17, 2022
- DrahtBot locked this on Aug 18, 2022