aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--main.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c054d24..ac0b8355 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-01-25 Arnold D. Robbins <arnold@skeeve.com>
+
+ * main.c (main): Add explanatory comment about O_APPEND stuff.
+
2018-01-22 Arnold D. Robbins <arnold@skeeve.com>
Fix the inplace tests on *BSD systems.
diff --git a/main.c b/main.c
index 79782a81..2860d246 100644
--- a/main.c
+++ b/main.c
@@ -247,6 +247,9 @@ main(int argc, char **argv)
locale_dir = cp;
#if defined(F_GETFL) && defined(O_APPEND)
+ // 1/2018: This is needed on modern BSD systems so that the
+ // inplace tests pass. I think it's a bug in those kernels
+ // but let's just work around it anyway.
int flags = fcntl(fileno(stderr), F_GETFL, NULL);
if (flags >= 0 && (flags & O_APPEND) == 0) {
flags |= O_APPEND;