mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
rand: only try and use freeifaddrs if available
Github-Pull: #21486
Rebased-From: 87deac66aa
This commit is contained in:
parent
65fa43bda1
commit
e99d6d0c7c
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@
|
|||
#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if HAVE_DECL_GETIFADDRS
|
||||
#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
#if HAVE_SYSCTL
|
||||
|
@ -361,7 +361,7 @@ void RandAddStaticEnv(CSHA512& hasher)
|
|||
hasher.Write((const unsigned char*)hname, strnlen(hname, 256));
|
||||
}
|
||||
|
||||
#if HAVE_DECL_GETIFADDRS
|
||||
#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS
|
||||
// Network interfaces
|
||||
struct ifaddrs *ifad = NULL;
|
||||
getifaddrs(&ifad);
|
||||
|
|
Loading…
Add table
Reference in a new issue