Fix BSD fseeko to seek from the end of the file.
authorBruce Momjian <[email protected]>
Thu, 11 Aug 2005 23:05:14 +0000 (23:05 +0000)
committerBruce Momjian <[email protected]>
Thu, 11 Aug 2005 23:05:14 +0000 (23:05 +0000)
src/port/fseeko.c

index 6e39c37044115909ea41e4797e3c4fd3e0dfb5da..c53683ab6f91b600780e7ee75b6c836eec5f8ea6 100644 (file)
@@ -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