From: Alexandre Oliva Date: Tue, 5 Jul 2022 09:12:27 +0000 (-0300) Subject: libstdc++: testsuite: cast getpid result X-Git-Tag: basepoints/gcc-14~5708 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b44cba355e1e27521b436cf56ea726d419939b5b;p=thirdparty%2Fgcc.git libstdc++: testsuite: cast getpid result On vxworks, in kernel mode, getpid's return type is a pointer type, so std::to_string on it fails overload resolution. Restore the type cast from the original patch that suggested adding the pid. for libstdc++-v3/ChangeLog * testsuite/util/testsuite_fs.h (nonexistent_path): Convert the getpid result to an integral type. --- diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h index 908fcdbcaee..25f8f734dc7 100644 --- a/libstdc++-v3/testsuite/util/testsuite_fs.h +++ b/libstdc++-v3/testsuite/util/testsuite_fs.h @@ -163,7 +163,7 @@ namespace __gnu_test file.resize(64); // The combination of random counter and PID should be unique for a given // run of the testsuite. - file += std::to_string(::getpid()); + file += std::to_string((unsigned long) ::getpid()); p = std::move(file); if (test_fs::exists(p)) throw test_fs::filesystem_error("Failed to generate unique pathname", p,