From 6033e29348c0440147bd56e5485a2ca3d549f2a7 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sat, 9 Jan 2010 13:41:14 +0100 Subject: [PATCH] Use standard pipe() syscall on non-Linux platforms --- src/filescanner.c | 4 ++++ src/httpd.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/filescanner.c b/src/filescanner.c index 35e40ce1..ca079d33 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -982,7 +982,11 @@ filescanner_init(void) return -1; } +#if defined(__linux__) ret = pipe2(exit_pipe, O_CLOEXEC); +#else + ret = pipe(exit_pipe); +#endif if (ret < 0) { DPRINTF(E_FATAL, L_SCAN, "Could not create pipe: %s\n", strerror(errno)); diff --git a/src/httpd.c b/src/httpd.c index 9c96de3e..438d970f 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -1070,7 +1070,11 @@ httpd_init(void) goto daap_fail; } +#if defined(__linux__) ret = pipe2(exit_pipe, O_CLOEXEC); +#else + ret = pipe(exit_pipe); +#endif if (ret < 0) { DPRINTF(E_FATAL, L_HTTPD, "Could not create pipe: %s\n", strerror(errno));