FWIW, I tries this. This cleanly applied on it but make ends with the following error.
$ make -s Writing postgres.bki Writing schemapg.h Writing postgres.description Writing postgres.shdescription Writing fmgroids.h Writing fmgrprotos.h Writing fmgrtab.c make[3]: *** No rule to make target `dependencies.o', needed by `objfiles.txt'. Stop. make[2]: *** [statistics-recursive] Error 2 make[1]: *** [all-backend-recurse] Error 2 make: *** [all-src-recurse] Error 2
Apologies. I was caught out by patching back on to master, then committing, and git diff'ing the last commit, where i'd of course forgotten to get add those files.
I'm just in the middle of fixing up some other stuff. Hopefully I'll post a working patch soon.