summaryrefslogtreecommitdiff
path: root/m4/inet_pton.m4
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-05-03 06:22:26 +0200
committerSimon Josefsson <simon@josefsson.org>2008-05-03 06:22:26 +0200
commit029a3a28224414fe9495a160febd3431b981e659 (patch)
treeed54ea8f1528d6514540944df770bd03d8ca0047 /m4/inet_pton.m4
parentc9a6a9bb007294bb8878d685f3e9336b3a5be1ed (diff)
downloadgnulib-029a3a28224414fe9495a160febd3431b981e659.tar.gz
Make sure inet_ntop/inet_pton is declared when needed.
Diffstat (limited to 'm4/inet_pton.m4')
-rw-r--r--m4/inet_pton.m45
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/inet_pton.m4 b/m4/inet_pton.m4
index 7d7f993a00..a57e4c6cba 100644
--- a/m4/inet_pton.m4
+++ b/m4/inet_pton.m4
@@ -1,4 +1,4 @@
-# inet_pton.m4 serial 4
+# inet_pton.m4 serial 5
dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -19,6 +19,9 @@ AC_DEFUN([gl_INET_PTON],
# Prerequisites of lib/inet_pton.c.
AC_DEFUN([gl_PREREQ_INET_PTON], [
AC_CHECK_DECLS([inet_pton],,,[#include <arpa/inet.h>])
+ if test $ac_cv_have_decl_inet_pton = no; then
+ HAVE_DECL_INET_PTON=0
+ fi
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([AC_C_RESTRICT])
])