diff options
author | jmcneill <jmcneill> | 2010-02-01 15:00:20 +0000 |
---|---|---|
committer | jmcneill <jmcneill> | 2010-02-01 15:00:20 +0000 |
commit | f2222dbe37eec893988f96096aea399f096e0c2f (patch) | |
tree | 6690fa66065a5b1d0f475cbd255c6d1550a826e2 /audio/pulseaudio/patches/patch-da | |
parent | 1c67e6acd085aa059da72cff2bcafb5470d37473 (diff) | |
download | pkgsrc-f2222dbe37eec893988f96096aea399f096e0c2f.tar.gz |
Update pulseaudio to 0.9.21.
Too many changes to list here:
http://pulseaudio.org/milestone/0.9.15
http://pulseaudio.org/milestone/0.9.16
http://pulseaudio.org/milestone/0.9.17
http://pulseaudio.org/milestone/0.9.18
http://pulseaudio.org/milestone/0.9.19
http://pulseaudio.org/milestone/0.9.20
http://pulseaudio.org/milestone/0.9.21
Diffstat (limited to 'audio/pulseaudio/patches/patch-da')
-rw-r--r-- | audio/pulseaudio/patches/patch-da | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/audio/pulseaudio/patches/patch-da b/audio/pulseaudio/patches/patch-da new file mode 100644 index 00000000000..1bfda54131c --- /dev/null +++ b/audio/pulseaudio/patches/patch-da @@ -0,0 +1,45 @@ +$NetBSD: patch-da,v 1.1 2010/02/01 15:00:20 jmcneill Exp $ + +--- src/modules/module-cli.c.orig 2009-11-23 03:57:05.000000000 +0000 ++++ src/modules/module-cli.c +@@ -105,6 +105,32 @@ int pa__init(pa_module*m) { + * of log messages, particularly because if stdout and stderr are + * dup'ed they share the same O_NDELAY, too. */ + ++#ifndef O_CLOEXEC ++ if ((fd = open("/dev/tty", O_RDWR|O_NONBLOCK)) >= 0) { ++ int flags; ++ if ((flags = fcntl(fd, F_GETFD)) < 0) { ++ pa_log_debug("Couldn't get file handle flags"); ++ close(fd); ++ fd = -1; ++ goto error; ++ } ++ flags |= FD_CLOEXEC; ++ if (fcntl(fd, F_SETFD, flags) < 0) { ++ pa_log_debug("Couldn't set file handle flags"); ++ close(fd); ++ fd = -1; ++ goto error; ++ } ++ io = pa_iochannel_new(m->core->mainloop, fd, fd); ++ pa_log_debug("Managed to open /dev/tty."); ++ } ++error: ++ if (fd < 0) { ++ io = pa_iochannel_new(m->core->mainloop, STDIN_FILENO, STDOUT_FILENO); ++ pa_iochannel_set_noclose(io, TRUE); ++ pa_log_debug("Failed to open /dev/tty, using stdin/stdout fds instead."); ++ } ++#else + if ((fd = open("/dev/tty", O_RDWR|O_CLOEXEC|O_NONBLOCK)) >= 0) { + io = pa_iochannel_new(m->core->mainloop, fd, fd); + pa_log_debug("Managed to open /dev/tty."); +@@ -113,6 +139,7 @@ int pa__init(pa_module*m) { + pa_iochannel_set_noclose(io, TRUE); + pa_log_debug("Failed to open /dev/tty, using stdin/stdout fds instead."); + } ++#endif + + m->userdata = pa_cli_new(m->core, io, m); + pa_cli_set_eof_callback(m->userdata, exit_on_eof ? eof_and_exit_cb : eof_and_unload_cb, m); |