Grab this patch and apply it with git am. Should apply cleanly to both vanilla wine and wine-staging.
git am