$NetBSD: patch-ab,v 1.1 2006/12/04 04:42:03 christos Exp $
--- getline.c	1969-12-31 19:00:00.000000000 -0500
+++ getline.c	2006-12-03 23:16:23.000000000 -0500
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#ifdef __NetBSD__
+int
+getline(char **buf, size_t *len, FILE *fp)
+{
+	static char *b;
+	if (b)
+		free(b);
+	for (;;) {
+		if ((*buf = fparseln(fp, len, NULL, NULL, 0)) == NULL)
+			return 0;
+		if (*len == 0) {
+			free(*buf);
+			continue;
+		}
+		b = *buf;
+		return *len;
+	}
+}
+#endif
