build: compile -D_GNU_SOURCE on linux
Fixes a number of -Wimplicit-function-declaration warnings for functions that are behind _GNU_SOURCE on old systems, like strndup() and pread(). PR-URL: https://github.com/libuv/libuv/pull/162 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
67bb2b5f70
commit
965fffc2e9
@ -303,6 +303,7 @@ endif
|
|||||||
|
|
||||||
if LINUX
|
if LINUX
|
||||||
include_HEADERS += include/uv-linux.h
|
include_HEADERS += include/uv-linux.h
|
||||||
|
libuv_la_CFLAGS += -D_GNU_SOURCE
|
||||||
libuv_la_SOURCES += src/unix/linux-core.c \
|
libuv_la_SOURCES += src/unix/linux-core.c \
|
||||||
src/unix/linux-inotify.c \
|
src/unix/linux-inotify.c \
|
||||||
src/unix/linux-syscalls.c \
|
src/unix/linux-syscalls.c \
|
||||||
|
|||||||
1
uv.gyp
1
uv.gyp
@ -195,6 +195,7 @@
|
|||||||
'cflags': [ '-Wstrict-aliasing' ],
|
'cflags': [ '-Wstrict-aliasing' ],
|
||||||
}],
|
}],
|
||||||
[ 'OS=="linux"', {
|
[ 'OS=="linux"', {
|
||||||
|
'defines': [ '_GNU_SOURCE' ],
|
||||||
'sources': [
|
'sources': [
|
||||||
'src/unix/linux-core.c',
|
'src/unix/linux-core.c',
|
||||||
'src/unix/linux-inotify.c',
|
'src/unix/linux-inotify.c',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user