joyent/node — pull request #7614 by bnoordhuis (2014-05-13 12:02:40+00:00)
Title: src: fix _XOPEN_SOURCE redefinition warning

Fix the following compiler warning on systems where _XOPEN_SOURCE is
defined by default:

../src/node_constants.cc:35:0: warning: "_XOPEN_SOURCE" redefined
#define _XOPEN_SOURCE 500

Move the (re)definition of _XOPEN_SOURCE to the top of the file while
we're here. Commit 00890e4 adds a `#define _XOPEN_SOURCE 500` in order
to make expose O_NONBLOCK but it does so after other system
headers have been included. If those headers include , then
the #include in node_constants.cc will be a no-op and O_NONBLOCK won't
be visible.

/cc @indutny