From: Richard Yao Date: Sat, 8 Apr 2017 17:14:14 +0000 (-0400) Subject: Add missing includes to zed_log.c X-Git-Tag: zfs-0.7.0-rc4~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc482ac2ed80d77cf0186ccf670e02545f4ba883;p=zfs Add missing includes to zed_log.c 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 --- 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