Skip to content

win32: Fix WSAStartup issues

Patrick Gaskin requested to merge pgaskin/pulseaudio:win32-wsastartup into master

WSAStartup was not being called for pacat and pactl built with meson, causing them to fail in pa_mainloop_new with "cannot create wakeup pipe". This issue also affects other applications linking to libpulse other than the pulseaudio daemon, which calls WSAStartup itself.

When built with autotools, WSAStartup would have been called in DllMain, which is recommended against by the documentation [1].

To fix these issues, the WSAStartup/WSACleanup calls can be moved into pa_mainloop_new/pa_mainloop_free.

[1] https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-wsastartup

Merge request reports