Skip to content

Commit 8b5af31

Browse files
authored
[OpenMP] Change check for OS to check for defined for a macro (#75012)
Check for the existence of the macro instead of checking for Solaris. illumos has this macro in sys/time.h. /export/home/brad/llvm-brad/openmp/runtime/src/z_Linux_util.cpp:77:9: warning: 'TIMEVAL_TO_TIMESPEC' macro redefined [-Wmacro-redefined] 77 | #define TIMEVAL_TO_TIMESPEC(tv, ts) \ | ^ /usr/include/sys/time.h:424:9: note: previous definition is here 424 | #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ | ^
1 parent 29bd78b commit 8b5af31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/runtime/src/z_Linux_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct kmp_sys_timer {
7272
struct timespec start;
7373
};
7474

75-
#if KMP_OS_SOLARIS
75+
#ifndef TIMEVAL_TO_TIMESPEC
7676
// Convert timeval to timespec.
7777
#define TIMEVAL_TO_TIMESPEC(tv, ts) \
7878
do { \

0 commit comments

Comments
 (0)