@@ -99,7 +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_FUNCS([pipe _pipe])
AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h])
@@ -156,10 +156,13 @@ error:
}
#ifndef HAVE_PIPE
+#ifdef HAVE__PIPE
static inline int pipe(int fds[2])
{
return _pipe(fds, 32768, O_NOINHERIT | O_BINARY);
+#define HAVE_PIPE
+#endif
#endif
static int ns_open_abort_pipe(netbios_ns *ns)