I sent a patch a year ago to support setting SO_ERROR (and not just fake success), but it was not accepted, presumably because I didn't have a compelling enough use case: https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.org/thread...