aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-01-25 19:48:11 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-01-25 19:48:11 +0200
commit271c0a2c9a4e3000684c2c61c926f2011aba6a2c (patch)
treecb33440a07f1058f8ed6d949131a95c5c0f42fe2 /main.c
parent521679e82cba143a0ac852cc7a246dea4d19cc56 (diff)
parent6c93e97d0f76cb688543943f64f6154be3927de5 (diff)
downloadegawk-271c0a2c9a4e3000684c2c61c926f2011aba6a2c.tar.gz
egawk-271c0a2c9a4e3000684c2c61c926f2011aba6a2c.tar.bz2
egawk-271c0a2c9a4e3000684c2c61c926f2011aba6a2c.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
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;