about summary refs log tree commit diff
path: root/absl
diff options
context:
space:
mode:
authorJoe Sylve <Joe.Sylve@gmail.com>2019-10-09T21·07-0500
committerAndy Getz <durandal@google.com>2019-10-09T21·07-0400
commitabea769b551f7a100f540967cb95debdb0080df8 (patch)
treed3b30c575aadbc41de7ccb8fbce7a402af3f97c5 /absl
parent25597bdfc148e91e27678ec30efa52f4fc8c164f (diff)
Fix ABSL_HAVE_ALARM check on mingw (#341)
* Fix ABSL_HAVE_ALARM check on mingw
Diffstat (limited to 'absl')
-rw-r--r--absl/base/config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index 1cb69b0f700e..039b73d81f70 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -334,6 +334,11 @@
 #define ABSL_HAVE_ALARM 1
 #elif defined(_MSC_VER)
 // feature tests for Microsoft's library
+#elif defined(__MINGW32__)
+// mingw32 doesn't provide alarm(2):
+// https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/5.2-trunk/mingwrt/include/unistd.h
+// mingw-w64 provides a no-op implementation:
+// https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/misc/alarm.c
 #elif defined(__EMSCRIPTEN__)
 // emscripten doesn't support signals
 #elif defined(__Fuchsia__)