[openmp] [test] Fix building the affinity/format/fields_values.c testcase on Windows
authorMartin Storsjö <martin@martin.st>
Wed, 2 Nov 2022 11:55:39 +0000 (11:55 +0000)
committerMartin Storsjö <martin@martin.st>
Fri, 11 Nov 2022 11:54:27 +0000 (13:54 +0200)
Add a missing <process.h> include for _getpid. Don't typedef the
pid_t type on mingw, as mingw headers already provide a typedef for
it.

Differential Revision: https://reviews.llvm.org/D137745

openmp/runtime/test/affinity/format/fields_values.c

index e56ce27..e7c1faf 100644 (file)
 
 #if defined(_WIN32)
 #include <windows.h>
+#include <process.h>
 #define getpid _getpid
+#ifndef __MINGW32__
 typedef int pid_t;
+#endif
 #define gettid GetCurrentThreadId
 #define my_gethostname(buf, sz) GetComputerNameA(buf, &(sz))
 #else