From abea769b551f7a100f540967cb95debdb0080df8 Mon Sep 17 00:00:00 2001 From: Joe Sylve Date: Wed, 9 Oct 2019 16:07:57 -0500 Subject: Fix ABSL_HAVE_ALARM check on mingw (#341) * Fix ABSL_HAVE_ALARM check on mingw --- absl/base/config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/absl/base/config.h b/absl/base/config.h index 1cb69b0..039b73d 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__) -- cgit v1.2.3