Skip to content

Commit

Permalink
avformat/file: add S_IFBLK/S_ISBLK compatability macro
Browse files Browse the repository at this point in the history
They are not available on Windows.

Signed-off-by: Zhao Zhili <[email protected]>
  • Loading branch information
quink-black committed Jan 12, 2023
1 parent 379e43e commit e30bf5a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libavformat/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e30bf5a

Please sign in to comment.