summaryrefslogtreecommitdiffstats
path: root/osdep/path-unix.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-10-21 04:55:41 +0200
committerDudemanguy <random342@airmail.cc>2023-11-05 17:36:17 +0000
commit174df99ffa53f1091589eaa4fa0c16cdd55a9326 (patch)
tree3a60d45615f18beed98a9b08267c28ed7e05dd5f /osdep/path-unix.c
parent3a8b107f6216b38a151d5ca1e9d4f2727e3418f5 (diff)
downloadmpv-174df99ffa53f1091589eaa4fa0c16cdd55a9326.tar.bz2
mpv-174df99ffa53f1091589eaa4fa0c16cdd55a9326.tar.xz
ALL: use new mp_thread abstraction
Diffstat (limited to 'osdep/path-unix.c')
-rw-r--r--osdep/path-unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/osdep/path-unix.c b/osdep/path-unix.c
index fed2695a87..eae8b6004d 100644
--- a/osdep/path-unix.c
+++ b/osdep/path-unix.c
@@ -16,14 +16,14 @@
*/
#include <string.h>
-#include <pthread.h>
#include "options/path.h"
+#include "osdep/threads.h"
#include "path.h"
#include "config.h"
-static pthread_once_t path_init_once = PTHREAD_ONCE_INIT;
+static mp_once path_init_once = MP_STATIC_ONCE_INITIALIZER;
#define CONF_MAX 512
static char mpv_home[CONF_MAX];
@@ -83,7 +83,7 @@ static void path_init(void)
const char *mp_get_platform_path_unix(void *talloc_ctx, const char *type)
{
- pthread_once(&path_init_once, path_init);
+ mp_exec_once(&path_init_once, path_init);
if (strcmp(type, "home") == 0)
return mpv_home;
if (strcmp(type, "old_home") == 0)