Commit e30bf5ac authored by Zhao Zhili's avatar Zhao Zhili

avformat/file: add S_IFBLK/S_ISBLK compatability macro

They are not available on Windows.
Signed-off-by: 's avatarZhao Zhili <zhilizhao@tencent.com>
parent 379e43e6
......@@ -68,6 +68,24 @@
# endif
#endif
/* S_ISREG not available on Windows */
#ifndef S_ISREG
# ifdef S_IFREG
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
# else
# define S_ISREG(m) 0
# endif
#endif
/* S_ISBLK not available on Windows */
#ifndef S_ISBLK
# ifdef S_IFBLK
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
# else
# define S_ISBLK(m) 0
# endif
#endif
/* standard file protocol */
typedef struct FileContext {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment