Skip to content
Snippets Groups Projects
Commit 1a5040b9 authored by Mark Whitehorn's avatar Mark Whitehorn Committed by Lorenz Meier
Browse files

only call fsync in NUTTX builds

parent 6f20b9e1
No related branches found
No related tags found
No related merge requests found
......@@ -441,7 +441,9 @@ protected:
PX4_WARN("mavlink logging disabled");
} else {
(void)fputs("\n", fp);
#ifdef __PX4_NUTTX
fsync(fp->fs_filedes);
#endif
}
} else if (write_err_count < write_err_threshold) {
......@@ -460,7 +462,9 @@ protected:
fputs(": ", fp);
fputs(msg.text, fp);
fputs("\n", fp);
#ifdef __PX4_NUTTX
fsync(fp->fs_filedes);
#endif
} else {
PX4_WARN("Failed to open MAVLink log: %s", log_file_path);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment