<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- linksys-tftp-1.2.1/main.c
+++ linksys-tftp-1.2.1/main.c
@@ -40,6 +40,10 @@
 #include &lt;setjmp.h&gt;
 #include &lt;ctype.h&gt;
 #include &lt;netdb.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;string.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;sys/sendfile.h&gt;
 
 #define	TIMEOUT		5		/* secs between rexmt's */
 
@@ -110,7 +112,7 @@
 char	*index();
 char	*rindex();
 
-main(argc, argv)
+int main(argc, argv)
 	char *argv[];
 {
 	struct sockaddr_in sin;
--- a/tftp.c
+++ b/tftp.c
@@ -36,8 +36,8 @@
 #include &lt;stdio.h&gt;
 #include &lt;errno.h&gt;
 #include &lt;setjmp.h&gt;
-
-extern	int errno;
+#include &lt;string.h&gt;
+#include &lt;unistd.h&gt;
 
 extern  struct sockaddr_in sin;         /* filled in by main */
 extern  int     f;                      /* the opened socket */
@@ -69,16 +69,6 @@ void timer(int sig)
 	longjmp(timeoutbuf, 1);
 }
 
-strnlen(s, n)
-	char *s;
-	int n;
-{
-	int i = 0;
-
-	while (n-- &gt; 0 &amp;&amp; *s++) i++;
-	return(i);
-}
-
 /*
  * Parse an OACK package and set blocksize accordingly
  */
</pre></body></html>