patch from andreasf which fixes build for gcc4 (part of bug #2637

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27061 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-08-19 13:50:02 +00:00
parent a1f34e7e89
commit f9eba888ca
3 changed files with 6 additions and 2 deletions
@@ -1,4 +1,5 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -1,6 +1,7 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -235,7 +235,8 @@ public:
virtual status_t Prepare()
{
fBytesRead = -1;
fFDs = (int[2]){-1, -1};
fFDs[0] = -1;
fFDs[1] = -1;
if (pipe(fFDs) != 0)
return errno;
@@ -288,7 +289,8 @@ public:
virtual status_t Prepare()
{
fBytesWritten = -1;
fFDs = (int[2]){-1, -1};
fFDs[0] = -1;
fFDs[1] = -1;
if (pipe(fFDs) != 0)
return errno;