summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/profiler.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 58579008f3a..c26eb6d1e89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4126,7 +4126,7 @@ getrusage get_current_dir_name \
lrand48 random rint trunc \
select getpagesize setlocale newlocale \
getrlimit setrlimit shutdown \
-pthread_sigmask strsignal setitimer \
+pthread_sigmask strsignal setitimer timer_getoverrun \
sendto recvfrom getsockname getifaddrs freeifaddrs \
gai_strerror sync \
getpwent endpwent getgrent endgrent \
diff --git a/src/profiler.c b/src/profiler.c
index 15a0eef0d3e..293e52633a8 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -232,9 +232,10 @@ static EMACS_INT current_sampling_interval;
/* Signal handler for sampling profiler. */
-/* timer_getoverrun is not implemented on Cygwin, but the following
- seems to be good enough for profiling. */
-#ifdef CYGWIN
+/* timer_getoverrun is not implemented on Cygwin prior to
+ cygwin-3.0.0, but the following seems to be good enough for
+ profiling. */
+#if defined CYGWIN && !defined HAVE_TIMER_GETOVERRUN
#define timer_getoverrun(x) 0
#endif