diff options
author | Richard Narron <richard@aaazen.com> | 2019-12-29 11:20:28 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-12-29 11:20:28 +0700 |
commit | c5864ccde0498a33582aa7fe20619b9176bb9cad (patch) | |
tree | e5256fdb72c7b6f1c46e4cc2e9d935e42d0f9126 /network/linksys-tftp/linksys-tftp-1.2.1-r1-header.patch | |
parent | bd1a7fd096cf42895510ebcd2b0c9411bd5e98cf (diff) |
network/linksys-tftp: Added (tftp client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/linksys-tftp/linksys-tftp-1.2.1-r1-header.patch')
-rw-r--r-- | network/linksys-tftp/linksys-tftp-1.2.1-r1-header.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/network/linksys-tftp/linksys-tftp-1.2.1-r1-header.patch b/network/linksys-tftp/linksys-tftp-1.2.1-r1-header.patch new file mode 100644 index 0000000000000..9944f3c059bc1 --- /dev/null +++ b/network/linksys-tftp/linksys-tftp-1.2.1-r1-header.patch @@ -0,0 +1,52 @@ +--- linksys-tftp-1.2.1/main.c ++++ linksys-tftp-1.2.1/main.c +@@ -40,6 +40,10 @@ + #include <setjmp.h> + #include <ctype.h> + #include <netdb.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> ++#include <sys/sendfile.h> + + #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 <stdio.h> + #include <errno.h> + #include <setjmp.h> +- +-extern int errno; ++#include <string.h> ++#include <unistd.h> + + 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-- > 0 && *s++) i++; +- return(i); +-} +- + /* + * Parse an OACK package and set blocksize accordingly + */ |