Skip to content

Commit dcf162c

Browse files
Sirraideitzexpoexpo
authored andcommitted
[OpenMP] [Tests] Update test broken by llvm#157364 (llvm#158751)
Fix another test impacted by llvm#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.
1 parent 064409d commit dcf162c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,13 @@ void check_native_thread_id() {
112112
*/
113113

114114
void check_host() {
115+
#ifdef _WIN32
116+
typedef DWORD buffer_size_t;
117+
#else
118+
typedef int buffer_size_t;
119+
#endif
115120
int i;
116-
int buffer_size = 256;
121+
buffer_size_t buffer_size = 256;
117122
const char* formats[2] = {"%{host}", "%H"};
118123
char hostname[256];
119124
my_gethostname(hostname, buffer_size);

0 commit comments

Comments
 (0)