[vlc-commits] file output: unfix SIGPIPE blocking if POSIX RTS is unsupported
Rémi Denis-Courmont
git at videolan.org
Sun May 31 12:19:52 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 31 13:14:15 2015 +0300| [b88ecc0add175530b2ad5d7c98b1c19200924073] | committer: Rémi Denis-Courmont
file output: unfix SIGPIPE blocking if POSIX RTS is unsupported
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b88ecc0add175530b2ad5d7c98b1c19200924073
---
modules/access_output/file.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/access_output/file.c b/modules/access_output/file.c
index 87213c9..7b643f6 100644
--- a/modules/access_output/file.c
+++ b/modules/access_output/file.c
@@ -50,6 +50,9 @@
#ifndef O_LARGEFILE
# define O_LARGEFILE 0
#endif
+#ifndef _POSIX_REALTIME_SIGNALS
+# define _POSIX_REALTIME_SIGNALS (-1)
+#endif
#define SOUT_CFG_PREFIX "sout-file-"
@@ -103,7 +106,7 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
return i_write;
}
-#ifdef S_ISSOCK
+#if (_POSIX_REALTIME_SIGNALS > 0)
static ssize_t WritePipe(sout_access_out_t *access, block_t *block)
{
int fd = (intptr_t)access->p_sys;
@@ -156,7 +159,11 @@ static ssize_t WritePipe(sout_access_out_t *access, block_t *block)
return total;
}
+#else
+# define WritePipe Write
+#endif
+#ifdef S_ISSOCK
static ssize_t Send(sout_access_out_t *access, block_t *block)
{
int fd = (intptr_t)access->p_sys;
@@ -191,8 +198,6 @@ static ssize_t Send(sout_access_out_t *access, block_t *block)
}
return total;
}
-#else
-# define WritePipe Write
#endif
/*****************************************************************************
More information about the vlc-commits
mailing list