This is actually a repost, it was originally posted last year: https://www.winehq.org/pipermail/wine-devel/2020-September/thread.html#17327...
This patch is substantially the same except that I have fixed it so it compiled against the latest master branch, and also fixed a place where I was not calculating a structure size correctly.
I did not add tests. The current socket tests (without this patch) don't pass for me and I don't understand how to make them work. However we do run this patch against our NBD server which makes extensive use of AF_UNIX in its test suite, and everything runs fine there.
I'd be happy if someone who understands the Wine code base better than me and wants AF_UNIX support wants to take this over.
Rich.