Skip to content

Commit 414f405

Browse files
fanquakeFuzzbawls
authored andcommitted
rand: only try and use freeifaddrs if available
# Conflicts: # src/randomenv.cpp
1 parent 3a039d6 commit 414f405

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/randomenv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include <mach/mach.h>
4343
#include <mach/mach_time.h>
4444
#endif
45-
#if HAVE_DECL_GETIFADDRS
45+
#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS
4646
#include <ifaddrs.h>
4747
#endif
4848
#if HAVE_SYSCTL
@@ -378,7 +378,7 @@ void RandAddStaticEnv(CSHA512& hasher)
378378
hasher.Write((const unsigned char*)hname, strnlen(hname, 256));
379379
}
380380

381-
#if HAVE_DECL_GETIFADDRS
381+
#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS
382382
// Network interfaces
383383
struct ifaddrs *ifad = NULL;
384384
getifaddrs(&ifad);

0 commit comments

Comments
 (0)