Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9e4a2de

Browse files
committed
Fix BSD fseeko to seek from the end of the file.
1 parent 8e9c52e commit 9e4a2de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/port/fseeko.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/fseeko.c,v 1.18 2005/07/28 04:03:14 tgl Exp $
11+
* $PostgreSQL: pgsql/src/port/fseeko.c,v 1.19 2005/08/11 23:05:14 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -70,6 +70,7 @@ fseeko(FILE *stream, off_t offset, int whence)
7070
if (fstat(fileno(stream), &filestat) != 0)
7171
goto failure;
7272
floc = filestat.st_size;
73+
floc += offset;
7374
if (fsetpos(stream, &floc) != 0)
7475
goto failure;
7576
#ifdef bsdi

0 commit comments

Comments
 (0)