due to giflib-5.2.2.patch2
I removed patch and build is ok. Not sure where this patch was needed, may be on older distros?
Maybe I did not correctly carry over patch2 when I upgraded giflib from 5.2.1 to 5.2.2 on August 16th GIT checkin.
Am I correct in assuming the 5.2.1 giflib with the previous patches built correctly on Termux? If so, then maybe I made a mistake in the 5.2.2 patch2.