From 1ca8cefa9afa94f8323a9b7c2e67b16894c32fdd Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 21 Feb 2017 11:32:32 +0000 Subject: [PATCH] Added #define needed for gettimeofday() to be declared on some versions of Cygwin --- include/internal/catch_timer.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_timer.hpp b/include/internal/catch_timer.hpp index 00adfc3b..881d890e 100644 --- a/include/internal/catch_timer.hpp +++ b/include/internal/catch_timer.hpp @@ -15,8 +15,17 @@ #endif #ifdef CATCH_PLATFORM_WINDOWS -#include "catch_windows_h_proxy.h" + +# include "catch_windows_h_proxy.h" + #else + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# ifdef __CYGWIN__ +# define _BSD_SOURCE +# endif + #include #endif