r587 compiles for me - thank you! Nice work. I didn't even need the patch.
I have this bug now with the latest 1.4.14 on Fedora 36. The build fails. My motivation is to apply a patch from Debian's bugtracker https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013877