summaryrefslogtreecommitdiffstats
path: root/common/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/common.h')
-rw-r--r--common/common.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h
index cd9bea93c2..7466ea2d61 100644
--- a/common/common.h
+++ b/common/common.h
@@ -24,6 +24,13 @@
#include <stdbool.h>
#include <stdint.h>
+#include "config.h"
+
+#if HAVE_POSIX || defined(__MINGW32__)
+#include <strings.h>
+#include <unistd.h>
+#endif
+
#include "osdep/compiler.h"
#include "mpv_talloc.h"
@@ -164,4 +171,25 @@ char **mp_dup_str_array(void *tctx, char **s);
abort(); \
} while (0)
+#ifdef _MSC_VER
+#define strncasecmp _strnicmp
+#define strcasecmp _stricmp
+
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 0
+#endif
+
+typedef long long ssize_t;
+typedef unsigned short mode_t;
+#endif
+
#endif /* MPLAYER_MPCOMMON_H */