#endif
#include "misc.h"
+/* Portability cruft, should become unnecessary eventually */
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif
+
#ifdef HAVE_GETADDRINFO
/*
* Inspired by example code from W. Richard Stevens: UNIX Network
struct addrinfo hints, *res, *ressave;
memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_flags = AI_ADDRCONFIG;
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;