file: Add S_ISFIFO compatability macro
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 7 Sep 2012 13:45:09 +0000 (09:45 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Sep 2012 18:23:14 +0000 (20:23 +0200)
Not all systems have S_ISFIFO.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/file.c

index 4e8129e..288275f 100644 (file)
 #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 */