瀏覽代碼

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

Hugo Beauzée-Luyssen 9 年之前
父節點
當前提交
dbf28eb90a
共有 2 個文件被更改,包括 2 次插入1 次删除
  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);