On Wed Apr 12 18:02:59 2023 +0000, Davide Beatrici wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/2636/diffs?diff_id=42021&start_sha=85ccc6400ee5f1249c7279bf2807d54e9a29e3ba#85a284be65a86930b0d159d55ce3ff99229a605d_29_29)
Interestingly, linking to `uuid` doesn't cause the build to fail anymore. The redefinitions were coming from `devenum.o`, which makes me think it was due to the object file not being rebuilt after I added the includes to `mmdevapi.h`.
For reference, while working on the PipeWire driver in 2021 I created the following:
<details><summary>guid.c</summary>
```c /* * GUID definition: one of the nightmares Windows developers live, sooner or later. * * There's a library called "uuid", which defines several GUID objects. * Some GUIDs we need are not defined by said lib. No problem, let's include "initguid.h". * * Oh no, the linker got mad at us because there are redefinitions! * Turns out a few GUIDs exist both in the "uuid" library and in headers... * * Okay, let's include "propsys.h" before "initguid.h". * Wow, would you look at that? The linker is happy! * * Basically, this file is a carpet we hide the dirt under to keep the rest clean. */
#include "windef.h" #include "propsys.h" // Needed by "propkey.h" #include "initguid.h" #include "ks.h" // Needed by "ksmedia.h" #include "ksmedia.h" #include "propkey.h" #include "mmdeviceapi.h" #include "audioclient.h" #include "endpointvolume.h" #include "audiopolicy.h" ``` </details>
Which then turned out not to be needed anymore.