From 9d09fddd4338c8ba40de3b5e06c6806071ab975f Mon Sep 17 00:00:00 2001 From: des Date: Tue, 27 Sep 2011 17:11:31 +0000 Subject: 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 --- usr.bin/fetch/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/fetch/fetch.c') 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 */ -- cgit v1.1