[Openmp-commits] [openmp] [OpenMP] [Tests] Update test broken by #157364 (PR #158751)
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Sep 15 15:48:55 PDT 2025
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/158751
Fix another test impacted by #157364.
On Windows, `GetComputerNameA()`, which is what this ends up calling, takes an `LPDWORD`, but we were handing it an `int*`; fix this by declaring it as a `DWORD` instead.
>From bff19064f65b10d51e12846fb19ce104592f42b2 Mon Sep 17 00:00:00 2001
From: Sirraide <aeternalmail at gmail.com>
Date: Tue, 16 Sep 2025 00:47:13 +0200
Subject: [PATCH] [OpenMP] [Tests] Fix test
---
openmp/runtime/test/affinity/format/fields_values.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/openmp/runtime/test/affinity/format/fields_values.c b/openmp/runtime/test/affinity/format/fields_values.c
index e7c1faf3e3c6f..b3cc4c32e77e8 100644
--- a/openmp/runtime/test/affinity/format/fields_values.c
+++ b/openmp/runtime/test/affinity/format/fields_values.c
@@ -112,8 +112,13 @@ void check_native_thread_id() {
*/
void check_host() {
+#ifdef _WIN32
+ typedef DWORD buffer_size_t;
+#else
+ typedef int buffer_size_t;
+#endif
int i;
- int buffer_size = 256;
+ buffer_size_t buffer_size = 256;
const char* formats[2] = {"%{host}", "%H"};
char hostname[256];
my_gethostname(hostname, buffer_size);
More information about the Openmp-commits
mailing list