Split from https://gitlab.winehq.org/wine/wine/-/merge_requests/4102
/cc @afrantzis
Fwiw I didn't use wl_list like suggested in !4102. I think we should prefer `struct list` everywhere possible, which is more convenient, and canonical in Wine (for instance I didn't find `list_add_tail` equivalent).