autoupdate
[gnulib.git] / tests / test-fchmod.c
index eaee746..6a33440 100644 (file)
@@ -22,6 +22,7 @@
 SIGNATURE_CHECK (fchmod, int, (int, mode_t));
 
 #include <errno.h>
+#include <unistd.h>
 
 #include "macros.h"
 
@@ -35,6 +36,7 @@ main (void)
     ASSERT (errno == EBADF);
   }
   {
+    close (99);
     errno = 0;
     ASSERT (fchmod (99, 0600) == -1);
     ASSERT (errno == EBADF);