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