Properly check for netdb.h (there is actually tens of places to fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89335
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
#include <sys/time.h>
#include <signal.h>
#include <errno.h>
-#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <net/if.h>
-#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/wait.h>
-#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <sys/resource.h>
#endif /* linux */
#include <regex.h>
-#if defined(__FreeBSD__) || defined( __NetBSD__ ) || defined(SOLARIS)
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
#if defined(SOLARIS)
int daemon(int, int); /* defined in libresolv of all places */
#include <sys/loadavg.h>
#endif
-#endif
#include "asterisk/logger.h"
#include "asterisk/options.h"