summaryrefslogtreecommitdiffstats
path: root/osdep/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/io.h')
-rw-r--r--osdep/io.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/osdep/io.h b/osdep/io.h
index ae3cdc1802..a24ad7c231 100644
--- a/osdep/io.h
+++ b/osdep/io.h
@@ -77,6 +77,7 @@ int mp_closedir(DIR *dir);
int mp_mkdir(const char *path, int mode);
FILE *mp_tmpfile(void);
char *mp_getenv(const char *name);
+off_t mp_lseek(int fd, off_t offset, int whence);
typedef struct {
size_t gl_pathc;
@@ -105,6 +106,13 @@ void mp_globfree(mp_glob_t *pglob);
#define tmpfile(...) mp_tmpfile(__VA_ARGS__)
#define getenv(...) mp_getenv(__VA_ARGS__)
+// Things MinGW defines as macros, and which we want to override only for the
+// user, and not io.c (which wants the original definition).
+#ifndef MP_HIDE_IO_REPLACEMENTS
+#undef lseek
+#define lseek(...) mp_lseek(__VA_ARGS__)
+#endif
+
#ifndef GLOB_NOMATCH
#define GLOB_NOMATCH 3
#endif