src: suppress warnings in uvwasi.c#70
Conversation
Defined `_GNU_SOURCE` to suppress warnings thrown during node build from scratch. Refs: nodejs/node#31139
|
Is this warnings in gcc 9 only ? |
|
@gengjiawen No, This is appearing in gcc version 6.3.1 20170216 |
|
Shouldn't this be done in the CMakeLists.txt file? Since this library is built on libuv, I'd like to keep the supported platforms the same as libuv's. Perhaps we should follow suit with libuv's CMakeLists.txt. |
|
|
||
| if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
| list(APPEND uvwasi_defines _GNU_SOURCE _POSIX_C_SOURCE=200112) | ||
| list(APPEND uvwasi_sources src/unix/linux-core.c) |
There was a problem hiding this comment.
Is this line being added by mistake?
There was a problem hiding this comment.
@addaleax , Thanks. That was a mistake. I meant to add uvwasi.c, based on my understanding about CMAKE that it will be subjected for _GNU_SOURCE macro definition. I corrected that now.
There was a problem hiding this comment.
You don't need to specify the source file, that's already done elsewhere. Take a look at libuv's CMakeList.txt, specifically the target_compile_definitions stanza. You need to add one for the uvwasi_a target.
|
Thanks for the PR and the reviews! |
Defined
_GNU_SOURCEto suppress warningsthrown during node build from scratch.
Refs: nodejs/node#31139