Index: src/context.h
--- src/context.h.orig	2011-08-03 23:41:32.000000000 +0200
+++ src/context.h	2019-09-28 09:41:30.400113000 +0200
@@ -22,6 +22,7 @@
 void		do_context_action(struct context *);
 
 void		check_context_timeout();
+void        check_context_linelimit();
 
 void		expand_context_action_macros(struct context *);
 
Index: src/logsurfer.c
--- src/logsurfer.c.orig	2011-09-05 10:35:08.000000000 +0200
+++ src/logsurfer.c	2019-09-28 09:41:00.276353000 +0200
@@ -452,6 +452,7 @@
 		(void) fprintf(stderr, "unable to allocate memory for notmatches\n");
 		exit(99);
 	}
+	logline_buffer[0]='\0';
 
 	/*
 	 * get some memory for the logline_buffer
Index: src/readline.c
--- src/readline.c.orig	1999-08-03 12:10:29.000000000 +0200
+++ src/readline.c	2019-09-28 09:39:16.362454000 +0200
@@ -12,6 +12,7 @@
 #endif
 
 #include <stdio.h>
+#include <stdlib.h>
 
 /* ugly, but portable */
 #if HAVE_STRING_H || STDC_HEADERS
