diff options
| author | Sirraide <aeternalmail@gmail.com> | 2025-09-16 01:01:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-15 23:01:01 +0000 |
| commit | eb1297910e361628719c1c5d81e60ca4e32fb64f (patch) | |
| tree | d6045ec8df8b1927f589ff447c3a74042d02debf /openmp | |
| parent | 9bedece621aec7d6b35836e6896abdb54940dfdf (diff) | |
[OpenMP] [Tests] Update test broken by #157364 (#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.
Diffstat (limited to 'openmp')
| -rw-r--r-- | openmp/runtime/test/affinity/format/fields_values.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openmp/runtime/test/affinity/format/fields_values.c b/openmp/runtime/test/affinity/format/fields_values.c index e7c1faf3e3c6..b3cc4c32e77e 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); |
