From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../files/linksys-tftp-1.2.1-r1-Makefile.patch | 28 ++++++++++++ .../files/linksys-tftp-1.2.1-r1-header.patch | 52 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch create mode 100644 net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch (limited to 'net-ftp/linksys-tftp/files') diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch new file mode 100644 index 000000000000..b374e808ece2 --- /dev/null +++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch @@ -0,0 +1,28 @@ +Fix LDFLAGS (bug http://bugs.gentoo.org/336956 ) and +CFLAGS (bug http://bugs.gentoo.org/240894 ) by +Michael Weber + +--- linksys-tftp-1.2.1/Makefile ++++ linksys-tftp-1.2.1/Makefile +@@ -19,18 +19,18 @@ + # We override /usr/include/arpa/tftp.h with our own because + # we want tu_block to be unsigned short, not short as on most platforms + # +-CFLAGS= -I. -O2 -Dsin=sin_x ++CFLAGS += -I. -Dsin=sin_x + #DEBUG + # CFLAGS= -I. -Wall -ggdb -Dsin=sin_x + SRCS= main.c tftp.c tftpsubs.c + OBJS= main.o tftp.o tftpsubs.o + DOBJS= tftpsubs.o +-CC= gcc ++CC?= gcc + + all: linksys-tftp + + linksys-tftp: ${OBJS} +- ${CC} -o $@ ${CFLAGS} ${OBJS} ++ ${CC} -o $@ ${CFLAGS} ${OBJS} ${LDFLAGS} + + clean: + rm -f ${OBJS} ${DOBJS} *core linksys-tftp 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 new file mode 100644 index 000000000000..9944f3c059bc --- /dev/null +++ b/net-ftp/linksys-tftp/files/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 + #include + #include ++#include ++#include ++#include ++#include + + #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 + #include + #include +- +-extern int errno; ++#include ++#include + + 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 + */ -- cgit v1.2.3