osx: avoid compilation warning with Clang

~~~~
src/unix/stream.c:1089:19: warning: variable length array folded to
constant array as an extension [-Wgnu-folding-constant]
  char cmsg_space[CMSG_SPACE(UV__CMSG_FD_SIZE)];
~~~~

PR-URL: https://github.com/libuv/libuv/pull/677
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Saúl Ibarra Corretgé 2016-01-06 10:07:34 +01:00
parent 01ab8d64ad
commit f1a13e9b4a

View File

@ -1082,6 +1082,11 @@ static int uv__stream_recv_cmsg(uv_stream_t* stream, struct msghdr* msg) {
}
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wgnu-folding-constant"
#endif
static void uv__read(uv_stream_t* stream) {
uv_buf_t buf;
ssize_t nread;
@ -1187,6 +1192,10 @@ static void uv__read(uv_stream_t* stream) {
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
#undef UV__CMSG_FD_COUNT
#undef UV__CMSG_FD_SIZE