From bc482ac2ed80d77cf0186ccf670e02545f4ba883 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sat, 8 Apr 2017 13:14:14 -0400 Subject: Add missing includes to zed_log.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 4.9.4 complains about implicit function declarations when building against musl on Gentoo. zed_log.c: In function ‘zed_log_pipe_open’: zed_log.c:69:7: warning: implicit declaration of function ‘getpid’ (int)getpid()); ^ zed_log.c:71:2: warning: implicit declaration of function ‘pipe’ if (pipe(_ctx.pipe_fd) < 0) ^ zed_log.c: In function ‘zed_log_pipe_close_reads’: zed_log.c:90:2: warning: implicit declaration of function ‘close’ if (close(_ctx.pipe_fd[0]) < 0) ^ zed_log.c: In function ‘zed_log_pipe_wait’: zed_log.c:141:3: warning: implicit declaration of function ‘read’ n = read(_ctx.pipe_fd[0], &c, sizeof (c)); The [-Wimplicit-function-declaration] at the end of each warning has been removed to meet comment style requirements. The man pages say to include and . Doing that silences the warnings. Reviewed-by: loli10K Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Richard Yao Closes #5993 --- cmd/zed/zed_log.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd') diff --git a/cmd/zed/zed_log.c b/cmd/zed/zed_log.c index 0697b7175..5a3f2dbdb 100644 --- a/cmd/zed/zed_log.c +++ b/cmd/zed/zed_log.c @@ -18,7 +18,9 @@ #include #include #include +#include #include +#include #include "zed_log.h" #define ZED_LOG_MAX_LOG_LEN 1024 -- cgit v1.2.3