summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-06-27 13:29:05 +0200
committerSimon Josefsson <simon@josefsson.org>2007-06-27 13:29:05 +0200
commit185a2d58ebd49d8e33f0ed501a6e09168e692f88 (patch)
treedd8d49d526ec6002505082905cc1739f048f79ab /gl
parent6b1da319e3997386458242d50a6a14c71af81873 (diff)
downloadgnutls-185a2d58ebd49d8e33f0ed501a6e09168e692f88.tar.gz
Fix gai_strerror on mingw32.
Diffstat (limited to 'gl')
-rw-r--r--gl/m4/getaddrinfo.m418
1 files changed, 15 insertions, 3 deletions
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index db285d9423..1fda1364b8 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,5 +1,5 @@
-# getaddrinfo.m4 serial 11
-dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# getaddrinfo.m4 serial 12
+dnl Copyright (C) 2004, 2005, 2006, 2007 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.
@@ -28,7 +28,19 @@ AC_DEFUN([gl_GETADDRINFO],
fi
])
- AC_REPLACE_FUNCS(gai_strerror)
+ # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
+ # inline function declared in ws2tcpip.h, so we need to get that
+ # header included somehow.
+ AC_MSG_CHECKING([for gai_strerror (possibly via ws2tcpip.h)])
+ AC_TRY_LINK([
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+], [gai_strerror (0);],
+ AC_MSG_RESULT([yes]),
+ [AC_MSG_RESULT([no])
+ AC_LIBOBJ(gai_strerror)])
+
gl_PREREQ_GETADDRINFO
])