diff options
author | Bruce Momjian | 2004-03-23 05:27:02 +0000 |
---|---|---|
committer | Bruce Momjian | 2004-03-23 05:27:02 +0000 |
commit | a765e44416f6e726ed1fcf8c98c024c1e97c1da1 (patch) | |
tree | 8c694fa481bfbfce3841d29519befd9d4189cf5d | |
parent | e0aaa03bf5f4ba3b2ad018989e273d5511d2fd6e (diff) |
fflush() FILE buffer to descriptor so stat call gets proper size in fseeko.c.
Fixed problem with pg_dump tar backups. Only happens on platforms that
use our port/fseeko.c, which is currently BSD/OS and NetBSD.
-rw-r--r-- | src/port/fseeko.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/port/fseeko.c b/src/port/fseeko.c index b7a81d6135..8fe2c4789a 100644 --- a/src/port/fseeko.c +++ b/src/port/fseeko.c @@ -68,6 +68,7 @@ fseeko(FILE *stream, off_t offset, int whence) #ifdef bsdi flockfile(stream); #endif + fflush(stream); /* force writes to fd for stat() */ if (fstat(fileno(stream), &filestat) != 0) goto failure; floc = filestat.st_size; |