libstdc++: Restore <unistd.h> in testsuite_fs.h header [PR 99096]
authorJonathan Wakely <jwakely@redhat.com>
Sun, 14 Feb 2021 20:38:32 +0000 (20:38 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Sun, 14 Feb 2021 20:38:32 +0000 (20:38 +0000)
libstdc++-v3/ChangeLog:

PR libstdc++/99096
* testsuite/util/testsuite_fs.h: Always include <unistd.h>.

libstdc++-v3/testsuite/util/testsuite_fs.h

index e4d04dd7799e3fb8ba0c9d8199699020b7ba61b6..1eadf7fa767775715b44d15c5836be6aad21b6ce 100644 (file)
@@ -34,10 +34,10 @@ namespace test_fs = std::experimental::filesystem;
 #include <fstream>
 #include <string>
 #include <cstdio>
+#include <unistd.h> // unlink, close, getpid
 
 #if defined(_GNU_SOURCE) || _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200112L
 #include <stdlib.h> // mkstemp
-#include <unistd.h> // unlink, close
 #else
 #include <random>   // std::random_device
 #endif