diff options
| author | Phil Nash | 2017-02-21 11:32:32 +0000 |
|---|---|---|
| committer | Phil Nash | 2017-02-21 11:32:32 +0000 |
| commit | 1ca8cefa9afa94f8323a9b7c2e67b16894c32fdd (patch) | |
| tree | 1936e0183600ad12860ff05547b4e5574f6bae36 /include | |
| parent | ca66dd243cf3da0c26840453c3a7803a414a6974 (diff) | |
| download | catch3-1ca8cefa9afa94f8323a9b7c2e67b16894c32fdd.tar.gz | |
Added #define needed for gettimeofday() to be declared on some versions of Cygwin
Diffstat (limited to 'include')
| -rw-r--r-- | include/internal/catch_timer.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
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 <sys/time.h> #endif |