]> Savannah Git Hosting - gnulib.git/commitdiff
getaddrinfo tests: Fix test failure on MSVC.
authorBruno Haible <bruno@clisp.org>
Tue, 2 Jul 2019 17:38:27 +0000 (19:38 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 2 Jul 2019 17:38:27 +0000 (19:38 +0200)
* tests/test-getaddrinfo.c: Include sockets.h.
(main): Invoke gl_sockets_startup.
* modules/getaddrinfo-tests (Depends-on): Add sockets.

ChangeLog
modules/getaddrinfo-tests
tests/test-getaddrinfo.c

index f9b086664901a73a612f89614984ee69c283bd15..ed3019ca242f2c2c497d4534edd6d00e0a02a5cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-07-02  Bruno Haible  <bruno@clisp.org>
+
+       getaddrinfo tests: Fix test failure on MSVC.
+       * tests/test-getaddrinfo.c: Include sockets.h.
+       (main): Invoke gl_sockets_startup.
+       * modules/getaddrinfo-tests (Depends-on): Add sockets.
+
 2019-07-01  Hannes Müller  <h.c.f.mueller@gmx.de>
 
        poll: Fix type of timeout pointer passed to select() on mingw x86_64.
index 521cf680f85030a3134dc517591a081769a7b8d9..64a7c2dce98e5c3d71da6dd47f672c0647551db6 100644 (file)
@@ -3,6 +3,7 @@ tests/signature.h
 tests/test-getaddrinfo.c
 
 Depends-on:
+sockets
 inet_ntop
 strerror
 
index 2f9dcc3d62269ba5d8b88020c4e1eea185efc641..41910ec71ab28e9f1723c6fabf8b2d879cd68f7e 100644 (file)
@@ -39,6 +39,8 @@ SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *,
 #include <stdio.h>
 #include <string.h>
 
+#include "sockets.h"
+
 /* Whether to print debugging messages.  */
 #define ENABLE_DEBUGGING 0
 
@@ -167,6 +169,8 @@ simple (char const *host, char const *service)
 
 int main (void)
 {
+  (void) gl_sockets_startup (SOCKETS_1_1);
+
   return simple (HOST1, SERV1)
     + simple (HOST2, SERV2)
     + simple (HOST3, SERV3)