diff options
author | des <des@FreeBSD.org> | 2011-09-27 17:11:31 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2011-09-27 17:11:31 +0000 |
commit | 9d09fddd4338c8ba40de3b5e06c6806071ab975f (patch) | |
tree | 5c59f684b9e938375120d98fa53d52b0eed8bf48 /usr.bin/fetch | |
parent | eda0c8ad65d79d8f92a7ca7698c6ca66ddc1e066 (diff) | |
download | FreeBSD-src-9d09fddd4338c8ba40de3b5e06c6806071ab975f.zip FreeBSD-src-9d09fddd4338c8ba40de3b5e06c6806071ab975f.tar.gz |
Use fseeko() instead of fseek(). The rest of the code is off_t-aware,
but the use of fseek() means fetch(1) can't correctly resume a transfer
that was interrupted past the 2 GB mark.
Pointed out by: ache@
MFC after: 3 weeks
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/fetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 267deac..11b714f 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -561,8 +561,8 @@ fetch(char *URL, const char *path) } } /* seek to where we left off */ - if (of != NULL && fseek(of, url->offset, SEEK_SET) != 0) { - warn("%s: fseek()", path); + if (of != NULL && fseeko(of, url->offset, SEEK_SET) != 0) { + warn("%s: fseeko()", path); fclose(of); of = NULL; /* picked up again later */ |