Difficult. Even if what he suggests is the best way (and that is still to be established), it is a long term project. If only because, unlike most *nix compilers, FPC also has a libcless mode, exactly to isolate of these constant unnecessary incompatibilities.
Short solution is that you simply maintain a patch with the proper new functions called, and hope they don't changed the signature only the name.