$OpenBSD: patch-zmrx_c,v 1.2 2017/04/24 10:14:05 sthen Exp $
--- zmrx.c.orig	Thu Dec 12 07:24:08 1996
+++ zmrx.c	Mon Apr 24 11:12:16 2017
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+#include <stdlib.h>
 #include <string.h>
 #include <time.h>
 #include <utime.h>
@@ -70,7 +71,7 @@ show_progress(char * name,FILE * fp)
 
 	cps = ftell(fp) / duration;
 
-	fprintf(stderr,"zmrx: receiving file \"%s\" %8ld bytes (%3d %%/%5d cps)           \r",
+	fprintf(stderr,"receiving file \"%s\" %8ld bytes (%3d %%/%5d cps)\r",
 		name,ftell(fp),percentage,cps);
 }
 
@@ -223,7 +224,7 @@ receive_file()
 	}
 
 	if (opt_v) {
-		fprintf(stderr,"zmrx: receiving file \"%s\"\r",name);
+		fprintf(stderr,"receiving file \"%s\"\r",name);
 	}
 
 	sscanf(rx_data_subpacket + strlen(rx_data_subpacket) + 1,
@@ -342,7 +343,7 @@ receive_file()
 	 */
 
 	if (opt_v) {
-		fprintf(stderr,"zmrx: received file \"%s\"                 \n",name);
+		fprintf(stderr,"zmrx: received file \"%s\"\n",name);
 	}
 }
 
@@ -538,12 +539,12 @@ main(int argc,char ** argv)
 	{
 		int c;
 		do {
-			c = rx_raw();
+			c = rx_raw(1000);
 		} while (c != 'O' && c != TIMEOUT);
 
 		if (c != TIMEOUT) {
 			do {
-				c = rx_raw();
+				c = rx_raw(1000);
 			} while (c != 'O' && c != TIMEOUT);
 		}
 	}
