summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-03-05 19:28:08 +1100
committerDarren Tucker <dtucker@dtucker.net>2018-03-05 19:28:08 +1100
commit58fd4c5c0140f6636227ca7acbb149ab0c2509b9 (patch)
tree51a79fa23c4140148ba59f9c43107fedefe9bbae /openbsd-compat/bsd-misc.h
parent71e48bc7945f867029e50e06c665c66aed6d3c64 (diff)
Check for and work around buggy fflush(NULL).
Some really old platforms (eg SunOS4) segfault on fflush(NULL) so check for and work around. With klausz at haus-gisela.de.
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r--openbsd-compat/bsd-misc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index fb81e6c72..52ec52853 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -153,4 +153,8 @@ pid_t getsid(pid_t);
153int flock(int, int); 153int flock(int, int);
154#endif 154#endif
155 155
156#ifdef FFLUSH_NULL_BUG
157# define fflush(x) (_ssh_compat_fflush(x))
158#endif
159
156#endif /* _BSD_MISC_H */ 160#endif /* _BSD_MISC_H */