maint.mk: fix "release" target to build _version
[gnulib.git] / tests / test-nonblocking.c
index bfeef7b..aa7de78 100644 (file)
@@ -1,5 +1,5 @@
 /* Test manipulation of non-blocking flag.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -79,7 +79,7 @@ main (void)
   ASSERT (close (fd_pipe[1]) == 0);
 #endif /* GNULIB_TEST_PIPE2 */
 
-#if GNULIB_SOCKET
+#if GNULIB_TEST_SOCKET
   {
     /* Test sockets.  */
     bool sock_works = true;
@@ -104,7 +104,7 @@ main (void)
     ASSERT (close (fd_sock) == 0);
 # endif /* SOCK_NONBLOCK */
   }
-#endif /* GNULIB_SOCKET */
+#endif /* GNULIB_TEST_SOCKET */
 
   /* Test error handling.  */
   {
@@ -124,7 +124,7 @@ main (void)
   }
   {
     errno = 0;
-    ASSERT (set_nonblocking_flag (10000000, false) == -1);
+    ASSERT (set_nonblocking_flag (getdtablesize (), false) == -1);
     ASSERT (errno == EBADF);
   }