Revert "src: fix _XOPEN_SOURCE redefinition warning"
authorFedor Indutny <fedor@indutny.com>
Mon, 30 Jun 2014 08:43:28 +0000 (12:43 +0400)
committerTrevor Norris <trev.norris@gmail.com>
Wed, 2 Jul 2014 19:49:59 +0000 (12:49 -0700)
This reverts commit 885142a5edc2c803fa8b9d92b5d0771379237764.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
src/node_constants.cc

index adb6f28181292bc4995765bd95336c3ac0307036..d364fb2df49b2501d1243bbadc388677a2378b42 100644 (file)
 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 // USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-// O_NONBLOCK is not exported unless _XOPEN_SOURCE >= 500.
-#if defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 500
-#undef _XOPEN_SOURCE
-#endif
-
-#if !defined(_XOPEN_SOURCE)
-#define _XOPEN_SOURCE 500
-#endif
-
 #include "node_constants.h"
 
 #include "uv.h"
 
 #include <errno.h>
-#include <fcntl.h>
 #if !defined(_MSC_VER)
 #include <unistd.h>
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
 
+// O_NONBLOCK is not exported, unless _XOPEN_SOURCE is set
+#define _XOPEN_SOURCE 500
+#include <fcntl.h>
+
 #if HAVE_OPENSSL
 # include <openssl/ssl.h>
 #endif