[general] Put back support for platforms without pipe2(), see issue #239

This commit is contained in:
ejurgensen
2016-03-17 22:20:16 +01:00
parent ec43195633
commit b454a2fd60
11 changed files with 80 additions and 1 deletions

View File

@@ -2271,7 +2271,11 @@ filescanner_init(void)
return -1;
}
#ifdef HAVE_PIPE2
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));
@@ -2292,7 +2296,11 @@ filescanner_init(void)
goto ino_fail;
}
#ifdef HAVE_PIPE2
ret = pipe2(cmd_pipe, O_CLOEXEC);
#else
ret = pipe(cmd_pipe);
#endif
if (ret < 0)
{
DPRINTF(E_LOG, L_SCAN, "Could not create command pipe: %s\n", strerror(errno));