diff --git a/test/gtest-extra.cc b/test/gtest-extra.cc index 25fd8389..4281f274 100644 --- a/test/gtest-extra.cc +++ b/test/gtest-extra.cc @@ -47,10 +47,14 @@ #endif // _WIN32 // Retries the expression while it evaluates to -1 and error equals to EINTR. -#define FMT_RETRY(result, expression) \ +#ifndef _WIN32 +# define FMT_RETRY(result, expression) \ do { \ result = (expression); \ } while (result == -1 && errno == EINTR) +#else +# define FMT_RETRY(result, expression) result = (expression) +#endif namespace { #ifdef _WIN32