summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Hommel <wolf@code-wizards.com>2013-10-04 10:42:27 +0200
committerWolfgang Hommel <wolf@code-wizards.com>2013-10-04 10:42:27 +0200
commita7858cb1dd5f8da95840f9382cda5a08443a27fb (patch)
tree1b32d4e80f1d7daa636a1bf3dd478dfe32a5bcb5
parent1183cece14f38f325222e41368fb6ed437e3c8e0 (diff)
downloadlibfaketime-a7858cb1dd5f8da95840f9382cda5a08443a27fb.tar.gz
fixed for gcc > 4.6
-rw-r--r--src/faketime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/faketime.c b/src/faketime.c
index 04302ce..a180f8f 100644
--- a/src/faketime.c
+++ b/src/faketime.c
@@ -154,13 +154,13 @@ int main (int argc, char **argv)
if (!use_direct)
{
// TODO get seconds
- (void) pipe(pfds);
+ (void) (pipe(pfds) + 1);
int ret = EXIT_SUCCESS;
if (0 == (child_pid = fork()))
{
close(1); /* close normal stdout */
- (void) dup(pfds[1]); /* make stdout same as pfds[1] */
+ (void) (dup(pfds[1]) + 1); /* make stdout same as pfds[1] */
close(pfds[0]); /* we don't need this */
if (EXIT_SUCCESS != execlp(date_cmd, date_cmd, "-d", argv[curr_opt], "+%s",(char *) NULL))
{
@@ -172,7 +172,7 @@ int main (int argc, char **argv)
{
char buf[256] = {0}; /* e will have way less than 256 digits */
close(pfds[1]); /* we won't write to this */
- (void) read(pfds[0], buf, 256);
+ (void) (read(pfds[0], buf, 256) + 1);
waitpid(child_pid, &ret, 0);
if (ret != EXIT_SUCCESS)
{