From: Bruce Momjian Date: Fri, 12 Aug 2005 00:29:22 +0000 (+0000) Subject: Backpatch fseeko fix for seeking from end of file. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=b6a56e012d03665b3c2f8af7ae3af87bf4ad20e9;p=users%2Fbernd%2Fpostgres.git Backpatch fseeko fix for seeking from end of file. --- diff --git a/src/port/fseeko.c b/src/port/fseeko.c index ddd184ca3e..cdc7aac931 100644 --- a/src/port/fseeko.c +++ b/src/port/fseeko.c @@ -72,6 +72,7 @@ fseeko(FILE *stream, off_t offset, int whence) if (fstat(fileno(stream), &filestat) != 0) goto failure; floc = filestat.st_size; + floc += offset; if (fsetpos(stream, &floc) != 0) goto failure; #ifdef bsdi