From: Michael Tremer Date: Fri, 9 Sep 2022 14:28:27 +0000 (+0000) Subject: writer: Flush everything to disk after writing finishes X-Git-Tag: 0.9.15~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52580c0339e57bcce13446b39e163b4f7794cc9c;p=location%2Flibloc.git writer: Flush everything to disk after writing finishes This might solve a race in the testsuite. Signed-off-by: Michael Tremer --- diff --git a/src/writer.c b/src/writer.c index 03599c9..51e9a8e 100644 --- a/src/writer.c +++ b/src/writer.c @@ -753,5 +753,8 @@ LOC_EXPORT int loc_writer_write(struct loc_writer* writer, FILE* f, enum loc_dat fwrite(&header, 1, sizeof(header), f); + // Flush everything + fflush(f); + return r; }