[Openmp-commits] [PATCH] D137745: [openmp] [test] Fix building the affinity/format/fields_values.c testcase on Windows
Martin Storsjö via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 9 14:27:00 PST 2022
mstorsjo created this revision.
mstorsjo added reviewers: AndreyChurbanov, JonChesterfield, natgla.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137745
Files:
openmp/runtime/test/affinity/format/fields_values.c
Index: openmp/runtime/test/affinity/format/fields_values.c
===================================================================
--- openmp/runtime/test/affinity/format/fields_values.c
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137745.474364.patch
Type: text/x-patch
Size: 502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221109/ffdf1fc1/attachment.bin>
More information about the Openmp-commits
mailing list