Backpatch fseeko fix for seeking from end of file.
authorBruce Momjian <[email protected]>
Fri, 12 Aug 2005 00:29:22 +0000 (00:29 +0000)
committerBruce Momjian <[email protected]>
Fri, 12 Aug 2005 00:29:22 +0000 (00:29 +0000)
src/port/fseeko.c

index ddd184ca3ea962a84006e765d06aca0647cbbd7c..cdc7aac931c4201bfe2bcac26766f6a87c1b5f88 100644 (file)
@@ -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