From 5af4ee50a87058d07d296a2e48c67b9d69029f85 Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Tue, 1 Jan 2019 17:06:07 -0400 Subject: [PATCH] Minor update to defines and Makefile to avoid compile warnings when building logsave. --- src/logsave.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logsave.c b/src/logsave.c index c027032..0c9b1fd 100644 --- a/src/logsave.c +++ b/src/logsave.c @@ -13,6 +13,9 @@ #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */ #endif +#ifndef HAVE_SIGNAL_H +#define HAVE_SIGNAL_H +#endif #include #include @@ -23,7 +26,9 @@ #include #include #include +#ifdef HAVE_SIGNAL_H #include +#endif #ifdef HAVE_GETOPT_H #include #else @@ -188,7 +193,7 @@ static int run_program(char **argv) if (pid == 0) { dup2(fds[1],1); /* fds[1] replaces stdout */ dup2(fds[1],2); /* fds[1] replaces stderr */ - close(fds[0]); /* don't need this here */ + close(fds[0]); /* don't need this here */ close(fds[1]); execvp(argv[0], argv);