浏览代码

Netbios: do not use fcntl

O_NONBLOCK is not supported anyway on Windows, AFAICT
Jean-Baptiste Kempf 9 年之前
父节点
当前提交
0c3ffebfa6
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/netbios_ns.c

+ 2 - 0
src/netbios_ns.c

@@ -166,11 +166,13 @@ static int    ns_open_abort_pipe(netbios_ns *ns)
     if (pipe(ns->abort_pipe) == -1)
     if (pipe(ns->abort_pipe) == -1)
         return -1;
         return -1;
 
 
+#ifndef _WIN32
     if ((flags = fcntl(ns->abort_pipe[0], F_GETFL, 0)) == -1)
     if ((flags = fcntl(ns->abort_pipe[0], F_GETFL, 0)) == -1)
         return -1;
         return -1;
 
 
     if (fcntl(ns->abort_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1)
     if (fcntl(ns->abort_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1)
         return -1;
         return -1;
+#endif
 
 
     return 0;
     return 0;
 }
 }