Thanks for the bug reports. I installed patches that should address the two issues you raised, though not quite in the ways you suggested. GIFLIB before 5.1 has problems with GifErrorString's signature; a simple workaround is to avoid using GifErrorString in GIFLIB 5.0.x. Please see: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6ee7eabb5dbdf39f2d7471c9e42fc90c315e6a9f http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f962c5d6472804f788cdd54631bcc46aab5f59ce