Updating zlib correctly is surprisingly difficult. It's not just a question of whipping out the new version and doing a diff. You should make tests.
Like, you missed the #ifdef SMALL at first. Those tests include making a full release, and making sure it still works. It's also likely some of those local diffs are there for some specific architectures. If you don't have them, you have to ask for tests. I'm not saying it's not doable. But the fact you don't see the newer zlib in our tree kind-of indicates it takes quite a bit more testing than you would think.