summaryrefslogtreecommitdiffstats
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-04-13 19:15:54 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-13 19:15:54 +0100
commit08210f8def4886b0cd04dd4bbebed719f0512315 (patch)
treec04723d037a434c24ce1480a30f9ede304616f7a /src/vim.h
parentff6c230051ed2a2dbbbd517f51fe00c8ea27961b (diff)
patch 9.0.1450: MacOS: building fails if clock_gettime() is not availablev9.0.1450
Problem: MacOS: building fails if clock_gettime() is not available. Solution: Add a configure check for clock_gettime(). (closes #12242)
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vim.h b/src/vim.h
index 5289214ec1..656bcc9dab 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1873,7 +1873,8 @@ typedef LARGE_INTEGER proftime_T;
# define PROF_TOTALS_HEADER "count total (s) self (s)"
# else
// Use tv_fsec for fraction of second (micro or nano) of proftime_T
-# if defined(HAVE_TIMER_CREATE)
+# if defined(HAVE_TIMER_CREATE) && defined(HAVE_CLOCK_GETTIME)
+# define PROF_NSEC 1
typedef struct timespec proftime_T;
# define PROF_GET_TIME(tm) clock_gettime(CLOCK_MONOTONIC, tm)
# define tv_fsec tv_nsec