mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-24 03:27:46 -05:00
[general] Put back support for platforms without pipe2(), see issue #239
This commit is contained in:
@@ -4791,14 +4791,22 @@ int mpd_init(void)
|
||||
|
||||
v6enabled = cfg_getbool(cfg_getsec(cfg, "general"), "ipv6");
|
||||
|
||||
#ifdef HAVE_PIPE2
|
||||
ret = pipe2(g_exit_pipe, O_CLOEXEC);
|
||||
#else
|
||||
ret = pipe(g_exit_pipe);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_MPD, "Could not create pipe: %s\n", strerror(errno));
|
||||
goto exit_fail;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PIPE2
|
||||
ret = pipe2(g_cmd_pipe, O_CLOEXEC);
|
||||
#else
|
||||
ret = pipe(g_cmd_pipe);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_MPD, "Could not create command pipe: %s\n", strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user