accept tests: Fix for native Windows.
authorBruno Haible <bruno@clisp.org>
Tue, 20 Sep 2011 19:22:22 +0000 (21:22 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 20 Sep 2011 19:22:22 +0000 (21:22 +0200)
* tests/test-accept.c: Include sockets.h.
(main): Invoke gl_sockets_startup.
* modules/accept-tests (Depends-on): Add sockets.

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

index eed69ce..f3c6f99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-20  Bruno Haible  <bruno@clisp.org>
+
+       accept tests: Fix for native Windows.
+       * tests/test-accept.c: Include sockets.h.
+       (main): Invoke gl_sockets_startup.
+       * modules/accept-tests (Depends-on): Add sockets.
+
 2011-09-19  Bruno Haible  <bruno@clisp.org>
 
        msvc-inval: Require a semicolon after DONE_MSVC_INVAL.
index ea83a64..a03be0a 100644 (file)
@@ -5,6 +5,7 @@ tests/macros.h
 
 Depends-on:
 netinet_in
+sockets
 
 configure.ac:
 
index c4cef47..75161a4 100644 (file)
@@ -24,11 +24,14 @@ SIGNATURE_CHECK (accept, int, (int, struct sockaddr *, socklen_t *));
 #include <errno.h>
 #include <netinet/in.h>
 
+#include "sockets.h"
 #include "macros.h"
 
 int
 main (void)
 {
+  gl_sockets_startup (SOCKETS_1_1);
+
   /* Test behaviour for invalid file descriptors.  */
   {
     struct sockaddr_in addr;