summaryrefslogtreecommitdiff
path: root/libavformat/os_support.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-06-24 21:21:07 +0300
committerMartin Storsjö <martin@martin.st>2012-06-30 15:18:50 +0300
commit5a608a239b8193a420df7b1579999b71aa12f4a8 (patch)
tree0213a8a7e663f77a0295d559b6682986847b1d4b /libavformat/os_support.h
parentcab2eb87f9d692f543d11057dbfac4e590570b18 (diff)
os_support: Add fallback definitions for stat flags
Mingw headers provide similar defines already (unconditional #defines, without any #undef or #ifdef around it), while MSVC doesn't have them. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/os_support.h')
-rw-r--r--libavformat/os_support.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index dfb87ef43a..8e2eb83ccd 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -29,6 +29,8 @@
#include "config.h"
+#include <sys/stat.h>
+
#if defined(__MINGW32__) && !defined(__MINGW32CE__)
# include <fcntl.h>
# define lseek(f,p,w) _lseeki64((f), (p), (w))
@@ -55,6 +57,13 @@ static inline int is_dos_path(const char *path)
#define SHUT_RD SD_RECEIVE
#define SHUT_WR SD_SEND
#define SHUT_RDWR SD_BOTH
+
+#ifndef S_IRUSR
+#define S_IRUSR S_IREAD
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR S_IWRITE
+#endif
#endif
#if defined(_WIN32) && !defined(__MINGW32CE__)