PR remote/19496, internal err forking-threads-plus-bkpt
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / fileio.c
index b8c269817286841af75fa1aabadef772698437de..e44317344a2bffa82b5fbf3e5d969a72f3a55824 100644 (file)
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include <time.h>
 /* TESTS :
  * - open(const char *pathname, int flags, mode_t mode);
 1) Attempt to create file that already exists - EEXIST
@@ -169,6 +170,7 @@ test_write ()
       ret = write (fd, STRING, strlen (STRING));
       printf ("write 3: ret = %d, errno = %d %s\n", ret, errno,
              strerrno (errno));
+      close (fd);
     }
   else
     printf ("write 3: ret = %d, errno = %d\n", ret, errno);
This page took 0.02811 seconds and 4 git commands to generate.