$ git clone http://tcclient.ion.nu/tc_client.git
commit 66cc8a8bbdfd48a7431b051d8752d0ed277dfff0
Author: Alicia <...>
Date:   Fri Oct 7 20:40:30 2016 +0200

    tc_client-gtk: added compatibility code for windows' lack of pipe()

diff --git a/ChangeLog b/ChangeLog
index 86876ab..f20b3a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@ tc_client-gtk: added an option to pick the greenscreen "green" color from the ca
 tc_client-gtk: added a compatibility macro for versions of gdk-pixbuf lacking gdk_pixbuf_read_pixels()
 tc_client-gtk: fixed resampling of incoming audio.
 tc_client-gtk: added GTK+2 compatibility code related to the greenscreen camera color picker.
+tc_client-gtk: added compatibility code for windows' lack of pipe()
 tc_client-gtk and camviewer: updated to libavcodec's avcodec_{send,receive}_{frame,packet} API.
 camviewer: removed the old, buggy audio code.
 libcamera(v4l2): cache the frame and if there is no data to be read, return the cache instead of blocking.
diff --git a/utilities/gtk/compat.h b/utilities/gtk/compat.h
index 0088ec7..6788ca0 100644
--- a/utilities/gtk/compat.h
+++ b/utilities/gtk/compat.h
@@ -49,6 +49,13 @@ extern SECURITY_ATTRIBUTES sa;
     if(pipeout){startup.hStdOutput=h_pipe_out1;} \
     CreateProcess(0, cmd, 0, 0, 1, DETACHED_PROCESS, 0, 0, &startup, &procinfo); \
   }
+#define pipe(fds) \
+  { \
+    HANDLE pipe0, pipe1; \
+    CreatePipe(&pipe0, &pipe1, &sa, 0); \
+    fds[0]=_open_osfhandle(pipe0, _O_RDONLY); \
+    fds[1]=_open_osfhandle(pipe1, _O_WRONLY); \
+  }
 #endif
 #if GTK_MAJOR_VERSION<3
   #define GTK_ORIENTATION_HORIZONTAL 0