Minor update to defines and Makefile to avoid compile warnings
when building logsave.
This commit is contained in:
parent
3f2b4a5704
commit
5af4ee50a8
@ -13,6 +13,9 @@
|
|||||||
#ifndef _XOPEN_SOURCE
|
#ifndef _XOPEN_SOURCE
|
||||||
#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
|
#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef HAVE_SIGNAL_H
|
||||||
|
#define HAVE_SIGNAL_H
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -23,7 +26,9 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#ifdef HAVE_SIGNAL_H
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_GETOPT_H
|
#ifdef HAVE_GETOPT_H
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#else
|
#else
|
||||||
@ -188,7 +193,7 @@ static int run_program(char **argv)
|
|||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
dup2(fds[1],1); /* fds[1] replaces stdout */
|
dup2(fds[1],1); /* fds[1] replaces stdout */
|
||||||
dup2(fds[1],2); /* fds[1] replaces stderr */
|
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]);
|
close(fds[1]);
|
||||||
|
|
||||||
execvp(argv[0], argv);
|
execvp(argv[0], argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user