Skip to content
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

Merged
merged 4 commits into from
Jan 10, 2020

Conversation

HarshithaKP
Copy link
Member

Defined _GNU_SOURCE to suppress warnings
thrown during node build from scratch.

Refs: nodejs/node#31139

Defined `_GNU_SOURCE` to suppress warnings
thrown during node build from scratch.

Refs: nodejs/node#31139
@gengjiawen
Copy link
Member

Is this warnings in gcc 9 only ?

@HarshithaKP
Copy link
Member Author

@gengjiawen No, This is appearing in gcc version 6.3.1 20170216

@cjihrig
Copy link
Collaborator

cjihrig commented Jan 8, 2020

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)
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

@cjihrig cjihrig merged commit 676ba9a into nodejs:master Jan 10, 2020
@cjihrig
Copy link
Collaborator

cjihrig commented Jan 10, 2020

Thanks for the PR and the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants