aboutsummaryrefslogtreecommitdiff
path: root/openmp/runtime/src/z_Linux_util.cpp
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2023-12-11 09:54:24 -0500
committerGitHub <noreply@github.com>2023-12-11 09:54:24 -0500
commit8b5af3139c18516433bc77d65dea59df50e052e9 (patch)
tree910e5aad057f4767bed210ee10a622e91470d1c6 /openmp/runtime/src/z_Linux_util.cpp
parent29bd78b2f61e638f6c26bc417ae476754b91e985 (diff)
downloadllvm-8b5af3139c18516433bc77d65dea59df50e052e9.zip
llvm-8b5af3139c18516433bc77d65dea59df50e052e9.tar.gz
llvm-8b5af3139c18516433bc77d65dea59df50e052e9.tar.bz2
[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) { \ | ^
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.cpp')
-rw-r--r--openmp/runtime/src/z_Linux_util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp
index 72da0f7..fdce932 100644
--- a/openmp/runtime/src/z_Linux_util.cpp
+++ b/openmp/runtime/src/z_Linux_util.cpp
@@ -72,7 +72,7 @@ struct kmp_sys_timer {
struct timespec start;
};
-#if KMP_OS_SOLARIS
+#ifndef TIMEVAL_TO_TIMESPEC
// Convert timeval to timespec.
#define TIMEVAL_TO_TIMESPEC(tv, ts) \
do { \