--- a/compat_getline.c
+++ b/compat_getline.c
@@ -2,7 +2,7 @@
 
 #if HAVE_GETLINE
 
-int dummy;
+extern int dummy;
 
 #else