https://bugs.winehq.org/show_bug.cgi?id=43009
--- Comment #6 from Michael Müller michael@fds-team.de --- You need to apply the corresponding patches for the Wine version you try to build.
If you want to build Wine Staging 2.7, you need to checkout the 2.7 version of Wine and Wine Staging:
cd wine; git checkout wine-2.7 cd wine-staging; git checkout v2.7
If you want to build the HEAD of Wine Staging, you need to get the related upstream commit:
cd wine-staging; git checkout HEAD cd wine; git checkout $(../wine-staging/patches/patchinstall.sh --upstream-commit)