patch 9.0.1450: MacOS: building fails if clock_gettime() is not available

Problem:    MacOS: building fails if clock_gettime() is not available.
Solution:   Add a configure check for clock_gettime(). (closes #12242)
diff --git a/src/auto/configure b/src/auto/configure
index 77d2f5e..28eb7f3 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -12528,7 +12528,8 @@
 	getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
 	sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
 	strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
-	tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt
+	tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt \
+	clock_gettime
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/src/config.h.in b/src/config.h.in
index 6cb43da..d0257cc 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -225,6 +225,7 @@
 #undef HAVE_BIND_TEXTDOMAIN_CODESET
 #undef HAVE_MBLEN
 #undef HAVE_TIMER_CREATE
+#undef HAVE_CLOCK_GETTIME
 
 /* Define, if needed, for accessing large files. */
 #undef _LARGE_FILES
diff --git a/src/configure.ac b/src/configure.ac
index 0c776a2..6936ac9 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -3709,7 +3709,8 @@
 	getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
 	sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
 	strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
-	tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt)
+	tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt \
+	clock_gettime)
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_FSEEKO
 
diff --git a/src/errors.h b/src/errors.h
index 644b1af..f54adc7 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -3276,7 +3276,7 @@
 	INIT(= N_("E1285: Could not clear timeout: %s"));
 EXTERN char e_could_not_set_timeout_str[]
 	INIT(= N_("E1286: Could not set timeout: %s"));
-#ifndef HAVE_TIMER_CREATE
+#ifndef PROF_NSEC
 EXTERN char e_could_not_set_handler_for_timeout_str[]
 	INIT(= N_("E1287: Could not set handler for timeout: %s"));
 EXTERN char e_could_not_reset_handler_for_timeout_str[]
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 29206b9a..5c10f1e 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -6146,7 +6146,7 @@
 #endif
 		},
 	{"prof_nsec",
-#ifdef HAVE_TIMER_CREATE
+#ifdef PROF_NSEC
 		1
 #else
 		0
diff --git a/src/gui.c b/src/gui.c
index 0e00547..e9f951d 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -230,7 +230,7 @@
     int		exit_status;
     pid_t	pid = -1;
 
-# if defined(FEAT_RELTIME) && defined(HAVE_TIMER_CREATE)
+# if defined(FEAT_RELTIME) && defined(PROF_NSEC)
     // a timer is not carried forward
     delete_timer();
 # endif
diff --git a/src/os_unix.c b/src/os_unix.c
index 5801965..bba5d16 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -8271,7 +8271,7 @@
 #endif // USE_XSMP
 
 #if defined(FEAT_RELTIME) || defined(PROTO)
-# if defined(HAVE_TIMER_CREATE) || defined(PROTO)
+# if defined(PROF_NSEC) || defined(PROTO)
 /*
  * Implement timeout with timer_create() and timer_settime().
  */
@@ -8371,7 +8371,7 @@
     timer_created = FALSE;
 }
 
-# else // HAVE_TIMER_CREATE
+# else // PROF_NSEC
 
 /*
  * Implement timeout with setitimer()
@@ -8496,5 +8496,5 @@
     timer_active = TRUE;
     return &timeout_flag;
 }
-# endif // HAVE_TIMER_CREATE
+# endif // PROF_NSEC
 #endif  // FEAT_RELTIME
diff --git a/src/version.c b/src/version.c
index 23b39e7..ae81daa 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1450,
+/**/
     1449,
 /**/
     1448,
diff --git a/src/vim.h b/src/vim.h
index 5289214..656bcc9 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1873,7 +1873,8 @@
 #  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