[FFmpeg-devel] [PATCH] file: Add S_ISFIFO compatability macro

Derek Buitenhuis derek.buitenhuis at gmail.com
Fri Sep 7 15:45:09 CEST 2012


Not all systems have S_ISFIFO.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavformat/file.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavformat/file.c b/libavformat/file.c
index c54ec28..644e80b 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -31,6 +31,14 @@
 #include "os_support.h"
 #include "url.h"
 
+/* Some systems may not have S_ISFIFO */
+#ifndef S_ISFIFO
+#  ifdef S_IFIFO
+#    define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#  else
+#    define S_ISFIFO(m) 0
+#  endif
+#endif
 
 /* standard file protocol */
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list