Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2017-03-01 15:58:57 +0000
committerPhil Nash2017-03-01 15:59:10 +0000
commit673ec550f5688b920a264e69efb1915031cb5796 (patch)
tree56cbd4260324f918f75b7dad5d3709497604988c /include
parentff78e7c45af8910d6b4377a2c343b17b312c2799 (diff)
downloadcatch3-673ec550f5688b920a264e69efb1915031cb5796.tar.gz
Moved definition of _BSD_SOURCE earlier
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_compiler_capabilities.h4
-rw-r--r--include/internal/catch_timer.hpp7
2 files changed, 5 insertions, 6 deletions
diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h
index 16417b52..735d3d4b 100644
--- a/include/internal/catch_compiler_capabilities.h
+++ b/include/internal/catch_compiler_capabilities.h
@@ -81,6 +81,10 @@
# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
# endif
+// Required for some versions of Cygwin to declare gettimeofday
+// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
+# define _BSD_SOURCE
+
#endif // __CYGWIN__
////////////////////////////////////////////////////////////////////////////////
diff --git a/include/internal/catch_timer.hpp b/include/internal/catch_timer.hpp
index 881d890e..dfb7811f 100644
--- a/include/internal/catch_timer.hpp
+++ b/include/internal/catch_timer.hpp
@@ -20,13 +20,8 @@
#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
namespace Catch {