summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-17 08:47:25 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-17 08:48:07 -0400
commit0edd04444d07050437cff3bc2b9c48138a1c05eb (patch)
treeded53664fd460e8b7254f185e7976f0cb0156954 /net-ftp
parentnet-ftp/linksys-tftp: update HOMEPAGE/SRC_URI #557886 (diff)
downloadgentoo-0edd04444d07050437cff3bc2b9c48138a1c05eb.tar.gz
gentoo-0edd04444d07050437cff3bc2b9c48138a1c05eb.tar.bz2
gentoo-0edd04444d07050437cff3bc2b9c48138a1c05eb.zip
net-ftp/linksys-tftp: refresh & apply header patch
This was queued a while ago but never actually applied. Add it and update the patch to fix a few more files.
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch36
-rw-r--r--net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild1
2 files changed, 35 insertions, 2 deletions
diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
index 386cf7b1e210..9944f3c059bc 100644
--- a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
+++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
@@ -1,11 +1,13 @@
--- linksys-tftp-1.2.1/main.c
+++ linksys-tftp-1.2.1/main.c
-@@ -40,6 +40,8 @@
+@@ -40,6 +40,10 @@
#include <setjmp.h>
#include <ctype.h>
#include <netdb.h>
+#include <stdlib.h>
-+#include <strings.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/sendfile.h>
#define TIMEOUT 5 /* secs between rexmt's */
@@ -18,3 +20,33 @@
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
+ */
diff --git a/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
index 4b2379702830..8b635d4d349c 100644
--- a/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
+++ b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
@@ -16,6 +16,7 @@ KEYWORDS="amd64 ~ppc x86"
IUSE=""
src_prepare() {
+ epatch "${FILESDIR}"/${P}-r1-header.patch
epatch "${FILESDIR}"/${P}-r1-Makefile.patch
}