summaryrefslogtreecommitdiff
path: root/sysutils/fcron/files/patch-save.c
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-05-08 09:33:26 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-05-08 09:33:26 +0000
commit1eaca4435a9b6d940fa4f009d6452f3d0a44d908 (patch)
tree821c465a7112fc7fafa33b298c44fafe53b13014 /sysutils/fcron/files/patch-save.c
parentNew port: mail/p5-Email-Outlook-Message (diff)
sysutils/fcron: 3.0.6 -> 3.2.0
Changes: http://fcron.free.fr/doc/en/changes.html - updated maintainer mail PR: 209139 Submitted by: bob@eager.cx (maintainer)
Notes
Notes: svn path=/head/; revision=414794
Diffstat (limited to 'sysutils/fcron/files/patch-save.c')
-rw-r--r--sysutils/fcron/files/patch-save.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysutils/fcron/files/patch-save.c b/sysutils/fcron/files/patch-save.c
new file mode 100644
index 000000000000..5ddd7209eebd
--- /dev/null
+++ b/sysutils/fcron/files/patch-save.c
@@ -0,0 +1,15 @@
+Replace fdatasync() with fsync() because FreeBSD doesn't have fdatasync().
+
+--- save.c.orig 2014-05-10 17:03:59 UTC
++++ save.c
+@@ -311,8 +311,8 @@ write_file_to_disk(int fd, struct cf_t *
+ * This is to avoid cases where the file name (meta-data) would be updated,
+ * and there is a crash before the data is fully written: not sure if that
+ * is possible, but better safe than sorry! */
+- if (fdatasync(fd) < 0) {
+- error_e("could not fdatasync() %s's fcrontab", file->cf_user);
++ if (fsync(fd) < 0) {
++ error_e("could not fsync() %s's fcrontab", file->cf_user);
+ return ERR;
+ }
+