mirror of
https://github.com/mpv-player/mpv
synced 2025-01-16 12:02:39 +00:00
osdep/io: ignore 'x' mode for mp_fopen
fopen() with 'x' mode is a non-portable glibc extension, is currently unused, and should not be used in order to maintain POSIX compatibility. Thus there is no need for the Windows wrapper mp_fopen() to support it.
This commit is contained in:
parent
ae1a4ed28a
commit
c36e051470
@ -528,8 +528,7 @@ FILE *mp_fopen(const char *filename, const char *mode)
|
||||
for (const char *pos = mode + 1; *pos; pos++) {
|
||||
switch (*pos) {
|
||||
case '+': rwmode = _O_RDWR; break;
|
||||
case 'x': oflags |= _O_EXCL; break;
|
||||
// Ignore unknown flags (glibc does too)
|
||||
// Ignore unknown flags
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user