agent: Use AC_CHECK_HEADERS to check for netdb.h
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 15 Jul 2014 13:57:46 +0000 (14:57 +0100)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Wed, 16 Jul 2014 08:23:46 +0000 (09:23 +0100)
Rather than assuming it is not available on Windows.

agent/address.c
configure.ac

index afb890c..a8d9c76 100644 (file)
@@ -44,7 +44,7 @@
 
 #include <string.h>
 
-#ifndef G_OS_WIN32
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
 
index b14ff22..3041dd8 100644 (file)
@@ -85,7 +85,7 @@ AH_VERBATIM([_FORTIFY_SOURCE],
 # define _FORTIFY_SOURCE 2
 #endif])
 AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
-AC_CHECK_HEADERS([arpa/inet.h net/in.h])
+AC_CHECK_HEADERS([arpa/inet.h net/in.h netdb.h])
 AC_CHECK_HEADERS([ifaddrs.h], \
                      [AC_DEFINE(HAVE_GETIFADDRS, [1], \
                       [Whether getifaddrs() is available on the system])])