瀏覽代碼

compat/w32pthreads: fix compatibility with C++

Timo Rothenpieler 2 月之前
父節點
當前提交
7856f57533
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compat/w32pthreads.h

+ 2 - 2
compat/w32pthreads.h

@@ -46,7 +46,7 @@
 #include "libavutil/time.h"
 #include "libavutil/wchar_filename.h"
 
-typedef struct pthread_t {
+typedef struct w32pthread_t {
     void *handle;
     void *(*func)(void* arg);
     void *arg;
@@ -85,7 +85,7 @@ static av_unused int pthread_create(pthread_t *thread, const void *unused_attr,
 {
     pthread_t ret;
 
-    ret = av_mallocz(sizeof(*ret));
+    ret = (pthread_t)av_mallocz(sizeof(*ret));
     if (!ret)
         return EAGAIN;