Added #define needed for gettimeofday() to be declared on some versions of Cygwin

This commit is contained in:
Phil Nash 2017-02-21 11:32:32 +00:00
parent ca66dd243c
commit 1ca8cefa9a
1 changed files with 10 additions and 1 deletions

View File

@ -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