-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
CMakeLists.txt
Outdated
@@ -16,6 +16,11 @@ if(APPLE) | |||
set(CMAKE_MACOSX_RPATH ON) | |||
endif() | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line being added by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_SOURCE
to suppress warningsthrown during node build from scratch.
Refs: nodejs/node#31139