summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-02-19 03:13:51 -0500
committersfan5 <sfan5@live.de>2024-02-23 21:35:43 +0100
commitc36e051470dceb24c75d36316490e063a77dacba (patch)
treebfd337006ff21c478702e598b649575557503d60
parentae1a4ed28a0b10a61bc055b65f1e7aa9a01a074d (diff)
downloadmpv-c36e051470dceb24c75d36316490e063a77dacba.tar.bz2
mpv-c36e051470dceb24c75d36316490e063a77dacba.tar.xz
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.
-rw-r--r--osdep/io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/osdep/io.c b/osdep/io.c
index 617764c16a..bfcd44f096 100644
--- a/osdep/io.c
+++ b/osdep/io.c
@@ -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;
}
}