Bläddra i källkod

Netbios: provide a replacement for pipe for Windows

Jean-Baptiste Kempf 9 år sedan
förälder
incheckning
3abb031c79
1 ändrade filer med 7 tillägg och 0 borttagningar
  1. 7 0
      src/netbios_ns.c

+ 7 - 0
src/netbios_ns.c

@@ -152,6 +152,13 @@ error:
     return 0;
 }
 
+#ifdef _WIN32
+static inline int pipe(int fds[2])
+{
+    return _pipe(fds, 32768, O_NOINHERIT | O_BINARY);
+}
+#endif
+
 static int    ns_open_abort_pipe(netbios_ns *ns)
 {
     int flags;