diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-08-11 23:05:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-08-11 23:05:14 +0000 |
commit | 9e4a2de8448997924e74ace8dfd9ccd05acb2d08 (patch) | |
tree | 4e88fb24e0776ee6a807eccae164f286a5a86b21 /src | |
parent | 8e9c52e427e9a0b0b04f75b552c6d02b14c95520 (diff) | |
download | postgresql-9e4a2de8448997924e74ace8dfd9ccd05acb2d08.tar.gz postgresql-9e4a2de8448997924e74ace8dfd9ccd05acb2d08.zip |
Fix BSD fseeko to seek from the end of the file.
Diffstat (limited to 'src')
-rw-r--r-- | src/port/fseeko.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/port/fseeko.c b/src/port/fseeko.c index 47fb372cff2..671d7382f73 100644 --- a/src/port/fseeko.c +++ b/src/port/fseeko.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/fseeko.c,v 1.18 2005/07/28 04:03:14 tgl Exp $ + * $PostgreSQL: pgsql/src/port/fseeko.c,v 1.19 2005/08/11 23:05:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -70,6 +70,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 |