Przeglądaj źródła

Check for pipe() instead of assuming for it's presence on non win32 systems

Hugo Beauzée-Luyssen 9 lat temu
rodzic
commit
dbf28eb90a
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1 0
      configure.ac
  2. 1 1
      src/netbios_ns.c

+ 1 - 0
configure.ac

@@ -99,6 +99,7 @@ AC_CHECK_DECLS([CLOCK_MONOTONIC],,,[
 AC_REPLACE_FUNCS([strlcpy])
 AC_REPLACE_FUNCS([strndup])
 AC_REPLACE_FUNCS([clock_gettime])
+AC_CHECK_FUNCS([pipe])
 
 AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h])
 

+ 1 - 1
src/netbios_ns.c

@@ -155,7 +155,7 @@ error:
     return 0;
 }
 
-#ifdef _WIN32
+#ifndef HAVE_PIPE
 static inline int pipe(int fds[2])
 {
     return _pipe(fds, 32768, O_NOINHERIT | O_BINARY);