summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-05-01 19:40:37 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-05-06 22:01:17 +0200
commit18ef834ef411893b92e177855ee893f05a0859e9 (patch)
tree7da1ba0076a444cef83331896d022c5205bb085e /common
parente1e09938c5869929c3a7d1a81618b7b2e777ef6d (diff)
downloadmpv-18ef834ef411893b92e177855ee893f05a0859e9.tar.bz2
mpv-18ef834ef411893b92e177855ee893f05a0859e9.tar.xz
various: move unistd.h inclusion to common.h
Diffstat (limited to 'common')
-rw-r--r--common/common.h6
-rw-r--r--common/msg.c1
-rw-r--r--common/stats.c1
3 files changed, 6 insertions, 2 deletions
diff --git a/common/common.h b/common/common.h
index cd9bea93c2..44e9a1ba15 100644
--- a/common/common.h
+++ b/common/common.h
@@ -24,6 +24,12 @@
#include <stdbool.h>
#include <stdint.h>
+#include "config.h"
+
+#if HAVE_POSIX || defined(__MINGW32__)
+#include <unistd.h>
+#endif
+
#include "osdep/compiler.h"
#include "mpv_talloc.h"
diff --git a/common/msg.c b/common/msg.c
index 840f2ab30d..3e6bad2418 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include "mpv_talloc.h"
diff --git a/common/stats.c b/common/stats.c
index c5f1e50590..fac3c73598 100644
--- a/common/stats.c
+++ b/common/stats.c
@@ -1,6 +1,5 @@
#include <stdatomic.h>
#include <time.h>
-#include <unistd.h>
#include "common.h"
#include "global.h"