summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2018-12-05 19:02:03 +0100
committerAnton Kindestam <antonki@kth.se>2018-12-05 19:19:24 +0100
commit8b83c8996686072bc743b112ae5cb3bf93aa33ed (patch)
treeb09ce6a7ff470b05006622f19914b3d39d2f7d9f /osdep
parent5bcac8580df6fc62323136f756a3a6d1e754fe9c (diff)
parent559a400ac36e75a8d73ba263fd7fa6736df1c2da (diff)
downloadmpv-8b83c8996686072bc743b112ae5cb3bf93aa33ed.tar.bz2
mpv-8b83c8996686072bc743b112ae5cb3bf93aa33ed.tar.xz
Merge commit '559a400ac36e75a8d73ba263fd7fa6736df1c2da' into wm4-commits--merge-edition
This bumps libmpv version to 1.103
Diffstat (limited to 'osdep')
-rw-r--r--osdep/compiler.h5
-rw-r--r--osdep/subprocess-posix.c3
-rw-r--r--osdep/subprocess-win.c1
-rw-r--r--osdep/timer.c10
-rw-r--r--osdep/timer.h6
5 files changed, 8 insertions, 17 deletions
diff --git a/osdep/compiler.h b/osdep/compiler.h
index d25f0cd1e4..7c9f859f3a 100644
--- a/osdep/compiler.h
+++ b/osdep/compiler.h
@@ -17,5 +17,10 @@
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (gnu_printf, a1, a2)))
#endif
+#if __STDC_VERSION__ >= 201112L
+#include <stdalign.h>
+#else
+#define alignof(x) (offsetof(struct {char unalign_; x u;}, u))
+#endif
#endif
diff --git a/osdep/subprocess-posix.c b/osdep/subprocess-posix.c
index a5fe43c6d4..ff78eb42f8 100644
--- a/osdep/subprocess-posix.c
+++ b/osdep/subprocess-posix.c
@@ -26,8 +26,9 @@
#include "osdep/subprocess.h"
-#include "osdep/io.h"
#include "common/common.h"
+#include "misc/thread_tools.h"
+#include "osdep/io.h"
#include "stream/stream.h"
extern char **environ;
diff --git a/osdep/subprocess-win.c b/osdep/subprocess-win.c
index bbb1f6f7fd..b5a9e1a24d 100644
--- a/osdep/subprocess-win.c
+++ b/osdep/subprocess-win.c
@@ -27,6 +27,7 @@
#include "common/common.h"
#include "stream/stream.h"
#include "misc/bstr.h"
+#include "misc/thread_tools.h"
static void write_arg(bstr *cmdline, char *arg)
{
diff --git a/osdep/timer.c b/osdep/timer.c
index f75aec76f3..c624b66e70 100644
--- a/osdep/timer.c
+++ b/osdep/timer.c
@@ -59,16 +59,6 @@ double mp_time_sec(void)
return mp_time_us() / (double)(1000 * 1000);
}
-int64_t mp_time_relative_us(int64_t *t)
-{
- int64_t r = 0;
- int64_t now = mp_time_us();
- if (*t)
- r = now - *t;
- *t = now;
- return r;
-}
-
int64_t mp_add_timeout(int64_t time_us, double timeout_sec)
{
assert(time_us > 0); // mp_time_us() returns strictly positive values
diff --git a/osdep/timer.h b/osdep/timer.h
index b4a64c7820..78457d9b9a 100644
--- a/osdep/timer.h
+++ b/osdep/timer.h
@@ -39,12 +39,6 @@ void mp_sleep_us(int64_t us);
#define MP_START_TIME 10000000
-// Return the amount of time that has passed since the last call, in
-// microseconds. *t is used to calculate the time that has passed by storing
-// the current time in it. If *t is 0, the call will return 0. (So that the
-// first call will return 0, instead of the absolute current time.)
-int64_t mp_time_relative_us(int64_t *t);
-
// Add a time in seconds to the given time in microseconds, and return it.
// Takes care of possible overflows. Never returns a negative or 0 time.
int64_t mp_add_timeout(int64_t time_us, double timeout_sec);