aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-28 20:58:08 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-28 20:58:55 +0100
commit534c573adf534c29fce8a23a46eb82f154885588 (patch)
treeb266cb17cd167c5c039313f6aa31f1f7310f9d39 /include
parent887b67908d0e6a2b2f50e04319c1cf4412a25f89 (diff)
Add a minimal fallback implementation for getline()
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/util/compat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/util/compat.h b/include/util/compat.h
index 8566090..5c9e4fb 100644
--- a/include/util/compat.h
+++ b/include/util/compat.h
@@ -110,6 +110,12 @@ struct stat {
#include <sys/sysmacros.h>
#endif
+#ifndef HAVE_GETLINE
+#include <stdio.h>
+
+ssize_t getline(char **line, size_t *n, FILE *fp);
+#endif
+
#ifndef HAVE_STRNDUP
char *strndup(const char *str, size_t max_len);
#endif