summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-21 22:40:51 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-21 22:40:51 +0000
commit1007b27b6dcc95329905f10d36ea85c7c18f31b6 (patch)
tree389e07ef7a15eed1540c33c234e89553270df74a /stream/stream_file.c
parent29a0a85b48557cc08ec4ac7e95711644bd03c017 (diff)
downloadmpv-1007b27b6dcc95329905f10d36ea85c7c18f31b6.tar.bz2
mpv-1007b27b6dcc95329905f10d36ea85c7c18f31b6.tar.xz
fix compilation on the most delicious variant of unix (mingw) that lacks S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21721 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index fa5b0126b9..aa946c5c14 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -135,8 +135,13 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
} else {
if(mode == STREAM_READ)
f=open(filename,m);
- else
- f=open(filename,m, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ else {
+ mode_t openmode = S_IRUSR|S_IWUSR;
+#ifndef __MINGW32__
+ openmode |= S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
+#endif
+ f=open(filename,m, openmode);
+ }
if(f<0) {
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
m_struct_free(&stream_opts,opts);