a1a075caa2
This is the reason why files >= 2G could not be added to cpio, even on 64-bit architectures. Fwrite was called with a buffer >= 2G, but the return value was truncated to int (this narrowing conversion is probably undefined behavior already; what happens next, though, is that after casting to size_t it assumes a very big numeric value of >= 2^64-2^32). So rpmbuild was failing with an unrelated errno, "cpio: write failed - Bad file descriptor". There are other reasons why this still won't work on 32-bit architectures. For one, rpmbuild mmaps a file before feeding it to cpio, and 32-bit architectures have a very limited ability, if any, to mmap 2G+ files. |
||
---|---|---|
.. | ||
.lclintrc | ||
bsearch.h | ||
digest.c | ||
macro.c | ||
Makefile.am | ||
rpmerr.h | ||
rpmio_internal.h | ||
rpmio.c | ||
rpmio.h | ||
rpmlog.c | ||
rpmlog.h | ||
rpmmacro.h | ||
rpmmalloc.c | ||
rpmmessages.h | ||
rpmpgp.c | ||
rpmpgp.h | ||
rpmrpc.c | ||
rpmurl.h | ||
strcasecmp.c | ||
stubs.c | ||
tdigest.c | ||
tficl.c | ||
tkey.c | ||
tring.c | ||
trpmio.c | ||
ugid.c | ||
ugid.h | ||
url.c |