From 965fffc2e9eb550fff09fda0f11a7214238e0181 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 23 Jan 2015 23:43:03 +0100 Subject: [PATCH] build: compile -D_GNU_SOURCE on linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- Makefile.am | 1 + uv.gyp | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index e6af91d0..6c252298 100644 --- a/Makefile.am +++ b/Makefile.am @@ -303,6 +303,7 @@ endif if LINUX include_HEADERS += include/uv-linux.h +libuv_la_CFLAGS += -D_GNU_SOURCE libuv_la_SOURCES += src/unix/linux-core.c \ src/unix/linux-inotify.c \ src/unix/linux-syscalls.c \ diff --git a/uv.gyp b/uv.gyp index 45af6a1f..d93f66ad 100644 --- a/uv.gyp +++ b/uv.gyp @@ -195,6 +195,7 @@ 'cflags': [ '-Wstrict-aliasing' ], }], [ 'OS=="linux"', { + 'defines': [ '_GNU_SOURCE' ], 'sources': [ 'src/unix/linux-core.c', 'src/unix/linux-inotify.c',