Remove _POSIX_C_SOURCE and _XOPEN_SOURCE definitions when compiling o… (#6205)

* Remove _POSIX_C_SOURCE and _XOPEN_SOURCE definitions when compiling on OpenBSD

* Only define _POSIX_C_SOURCE and _XOPEN_SOURCE for mingw/cygwin platforms

* Only define POSIX statements for mingw/cygwin/qnx platforms
This commit is contained in:
Jason Lenz
2020-11-12 12:12:32 -06:00
committed by GitHub
parent d0d51e2a5c
commit de1f0342c8

View File

@@ -17,8 +17,11 @@
// clang-format off
// Dont't remove `format off`, it prevent reordering of win-includes.
#if defined(__MINGW32__) || defined(__MINGW64__) || defined(__CYGWIN__) || \
defined(__QNXNTO__)
# define _POSIX_C_SOURCE 200809L
# define _XOPEN_SOURCE 700L
#endif
#ifdef _WIN32
# ifndef WIN32_LEAN_AND_MEAN