Skip to content

Commit 4bf5893

Browse files
committed
[openmp] [test] Fix building the affinity/format/fields_values.c testcase on Windows
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
1 parent 3438ed8 commit 4bf5893

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919

2020
#if defined(_WIN32)
2121
#include <windows.h>
22+
#include <process.h>
2223
#define getpid _getpid
24+
#ifndef __MINGW32__
2325
typedef int pid_t;
26+
#endif
2427
#define gettid GetCurrentThreadId
2528
#define my_gethostname(buf, sz) GetComputerNameA(buf, &(sz))
2629
#else

0 commit comments

Comments
 (0)