https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83279
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> --- No, I didn't just fix the error code, the code will copy files larger than 2G now. I assume your 5.4 build doesn't use sendfile, so doesn't have the 2G limitation of sendfile.