From 6325759d7b1d82acdc3ff5755eba661cc2533458 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 31 Jan 2012 16:44:35 +0000 Subject: -fix for W32 pipes from bratao --- src/util/disk.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util/disk.c b/src/util/disk.c index d64bcbafb..b2a705593 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -2142,8 +2142,16 @@ GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int i fd); #else struct GNUNET_DISK_PipeHandle *p; + struct GNUNET_DISK_FileHandle *fds; BOOL ret; HANDLE tmp_handle; + + + p = GNUNET_malloc (sizeof (struct GNUNET_DISK_PipeHandle) + + 2 * sizeof (struct GNUNET_DISK_FileHandle)); + fds = (struct GNUNET_DISK_FileHandle *) &p[1]; + p->fd[0] = &fds[0]; + p->fd[1] = &fds[1]; /* All pipes are overlapped. If you want them to block - just * call WriteFile() and ReadFile() with NULL overlapped pointer. -- cgit v1.2.3