-# inet_ntop.m4 serial 11
-dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# inet_ntop.m4 serial 14
+dnl Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Most platforms that provide inet_ntop define it in libc.
dnl Solaris 8..10 provide inet_ntop in libnsl instead.
gl_save_LIBS=$LIBS
dnl Most platforms that provide inet_ntop define it in libc.
dnl Solaris 8..10 provide inet_ntop in libnsl instead.
gl_save_LIBS=$LIBS
# Prerequisites of lib/inet_ntop.c.
AC_DEFUN([gl_PREREQ_INET_NTOP], [
# Prerequisites of lib/inet_ntop.c.
AC_DEFUN([gl_PREREQ_INET_NTOP], [
- AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>])
+ AC_CHECK_HEADERS_ONCE([netdb.h])
+ AC_CHECK_DECLS([inet_ntop],,,
+ [#include <arpa/inet.h>
+ #if HAVE_NETDB_H
+ # include <netdb.h>
+ #endif
+ ])