Thanks, and I see that there is patch. That was fast! It looks to me like I should be able to apply it with
svn co http://svn.apache.org/repos/asf/hive/trunk hive
patch -p0 < HIVE-5847.1.patch
ant clean package
And indeed the patch is successfully applied. But the build fails because files are missing from the root:
build.xml – build-offline.xml – build-common.xml – build.properties
As well as directories ivy, ant and build.xml from these and other directories.