summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/openbsd-compat.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-07-02 21:16:58 +1000
committerDarren Tucker <dtucker@dtucker.net>2018-07-02 21:36:31 +1000
commit6301e6c787d4e26bfae1119ab4f747bbcaa94e44 (patch)
treee2aa2c85f60d32983b6017cc485df17bd2d9aeb6 /openbsd-compat/openbsd-compat.h
parent84623e0037628f9992839063151f7a9f5f13099a (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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index b48fb934..f5c833bf 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);
void closefrom(int);
#endif
+#ifndef HAVE_GETLINE
+ssize_t getline(char **, size_t *, FILE *);
+#endif
+
#ifndef HAVE_GETPAGESIZE
int getpagesize(void);
#endif