Skip to content

Commit 673ec55

Browse files
committed
Moved definition of _BSD_SOURCE earlier
1 parent ff78e7c commit 673ec55

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

include/internal/catch_compiler_capabilities.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
8282
# endif
8383

84+
// Required for some versions of Cygwin to declare gettimeofday
85+
// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
86+
# define _BSD_SOURCE
87+
8488
#endif // __CYGWIN__
8589

8690
////////////////////////////////////////////////////////////////////////////////

include/internal/catch_timer.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@
2020

2121
#else
2222

23-
// Required for some versions of Cygwin to declare gettimeofday
24-
// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
25-
# ifdef __CYGWIN__
26-
# define _BSD_SOURCE
27-
# endif
28-
2923
#include <sys/time.h>
24+
3025
#endif
3126

3227
namespace Catch {

0 commit comments

Comments
 (0)