diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-07-02 21:16:58 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-07-02 21:36:31 +1000 |
commit | 6301e6c787d4e26bfae1119ab4f747bbcaa94e44 (patch) | |
tree | e2aa2c85f60d32983b6017cc485df17bd2d9aeb6 /openbsd-compat/openbsd-compat.h | |
parent | 84623e0037628f9992839063151f7a9f5f13099a (diff) |
Add implementation of getline.
Add getline for the benefit of platforms that don't have it. Sourced
from NetBSD (OpenBSD's implementation is a little too chummy with the
internals of FILE).
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index b48fb9342..f5c833bf2 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h | |||
@@ -60,6 +60,10 @@ int bindresvport_sa(int sd, struct sockaddr *sa); | |||
60 | void closefrom(int); | 60 | void closefrom(int); |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #ifndef HAVE_GETLINE | ||
64 | ssize_t getline(char **, size_t *, FILE *); | ||
65 | #endif | ||
66 | |||
63 | #ifndef HAVE_GETPAGESIZE | 67 | #ifndef HAVE_GETPAGESIZE |
64 | int getpagesize(void); | 68 | int getpagesize(void); |
65 | #endif | 69 | #endif |