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
This commit is contained in:
nicodvb 2006-12-21 22:40:51 +00:00
parent 29a0a85b48
commit 1007b27b6d
1 changed files with 7 additions and 2 deletions

View File

@ -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);