[Openmp-commits] [openmp] 4bf5893 - [openmp] [test] Fix building the affinity/format/fields_values.c testcase on Windows
Martin Storsjö via Openmp-commits
openmp-commits at lists.llvm.org
Fri Nov 11 03:55:55 PST 2022
Author: Martin Storsjö
Date: 2022-11-11T13:54:27+02:00
New Revision: 4bf5893d1ab6ec733f7b0067c69779f5d3843046
URL: https://github.com/llvm/llvm-project/commit/4bf5893d1ab6ec733f7b0067c69779f5d3843046
DIFF: https://github.com/llvm/llvm-project/commit/4bf5893d1ab6ec733f7b0067c69779f5d3843046.diff
LOG: [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
Added:
Modified:
openmp/runtime/test/affinity/format/fields_values.c
Removed:
################################################################################
diff --git a/openmp/runtime/test/affinity/format/fields_values.c b/openmp/runtime/test/affinity/format/fields_values.c
index e56ce2786be4b..e7c1faf3e3c6f 100644
--- a/openmp/runtime/test/affinity/format/fields_values.c
+++ b/openmp/runtime/test/affinity/format/fields_values.c
@@ -19,8 +19,11 @@
#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
More information about the Openmp-commits
mailing list