]> git.sesse.net Git - ffmpeg/blobdiff - compat/w32pthreads.h
Merge commit 'd82d5379caca21005d8906829b35361c4a65408e'
[ffmpeg] / compat / w32pthreads.h
index 4ac2a995b84b300d57b811ba3d3c3c4980b6a2ae..0c9a7fa13b6a1195e99cbf6043978097c28edbf7 100644 (file)
@@ -399,18 +399,18 @@ static av_unused void w32thread_init(void)
 #if _WIN32_WINNT < 0x0600
     HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll"));
     /* if one is available, then they should all be available */
-    cond_init      =
-        (void*)GetProcAddress(kernel_dll, "InitializeConditionVariable");
-    cond_broadcast =
-        (void*)GetProcAddress(kernel_dll, "WakeAllConditionVariable");
-    cond_signal    =
-        (void*)GetProcAddress(kernel_dll, "WakeConditionVariable");
-    cond_wait      =
-        (void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS");
-    initonce_begin =
-        (void*)GetProcAddress(kernel_dll, "InitOnceBeginInitialize");
-    initonce_complete =
-        (void*)GetProcAddress(kernel_dll, "InitOnceComplete");
+    cond_init      = (void (WINAPI*)(pthread_cond_t *))
+        GetProcAddress(kernel_dll, "InitializeConditionVariable");
+    cond_broadcast = (void (WINAPI*)(pthread_cond_t *))
+        GetProcAddress(kernel_dll, "WakeAllConditionVariable");
+    cond_signal    = (void (WINAPI*)(pthread_cond_t *))
+        GetProcAddress(kernel_dll, "WakeConditionVariable");
+    cond_wait      = (BOOL (WINAPI*)(pthread_cond_t *, pthread_mutex_t *, DWORD))
+        GetProcAddress(kernel_dll, "SleepConditionVariableCS");
+    initonce_begin = (BOOL (WINAPI*)(pthread_once_t *, DWORD, BOOL *, void **))
+        GetProcAddress(kernel_dll, "InitOnceBeginInitialize");
+    initonce_complete = (BOOL (WINAPI*)(pthread_once_t *, DWORD, void *))
+        GetProcAddress(kernel_dll, "InitOnceComplete");
 #endif
 
 }