diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-05-13 19:42:03 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-05-13 19:42:03 +0000 |
commit | 93dcef6960d50f564028407a5e297e3031974f2b (patch) | |
tree | 354fef53b89c6d6b6237a1c07ba07db62df5b7e4 /www/ffproxy | |
parent | 957086cfe85705fe3234338f8ab4dbee09dd35e6 (diff) | |
download | ports-93dcef6960d50f564028407a5e297e3031974f2b.tar.gz ports-93dcef6960d50f564028407a5e297e3031974f2b.zip |
Prevent collision with getline(3)
While here regen patches
Notes
Notes:
svn path=/head/; revision=415144
Diffstat (limited to 'www/ffproxy')
-rw-r--r-- | www/ffproxy/files/patch-Makefile.in | 6 | ||||
-rw-r--r-- | www/ffproxy/files/patch-dbs.h | 4 | ||||
-rw-r--r-- | www/ffproxy/files/patch-request.c | 47 | ||||
-rw-r--r-- | www/ffproxy/files/patch-socket.c | 10 |
4 files changed, 57 insertions, 10 deletions
diff --git a/www/ffproxy/files/patch-Makefile.in b/www/ffproxy/files/patch-Makefile.in index 70b063d082d7..5adc85773c0c 100644 --- a/www/ffproxy/files/patch-Makefile.in +++ b/www/ffproxy/files/patch-Makefile.in @@ -1,6 +1,6 @@ ---- Makefile.in.orig +--- Makefile.in.orig 2005-01-05 15:50:10 UTC +++ Makefile.in -@@ -48,7 +48,7 @@ +@@ -48,7 +48,7 @@ man: conf: sed -e 's|_BASE_|$(pkgdatadir)|g' sample.config.s \ > sample.config || cp sample.config.s sample.config @@ -9,7 +9,7 @@ installdirs: mkinstalldirs $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \ -@@ -73,7 +73,7 @@ +@@ -73,7 +73,7 @@ install_man: man $(INSTALL_DATA) ffproxy.8 $(DESTDIR)$(mandir)/man8 install_config: conf diff --git a/www/ffproxy/files/patch-dbs.h b/www/ffproxy/files/patch-dbs.h index d293090a53ff..1cd9aa823100 100644 --- a/www/ffproxy/files/patch-dbs.h +++ b/www/ffproxy/files/patch-dbs.h @@ -1,5 +1,5 @@ ---- dbs.h.orig Sun Jul 20 19:16:32 2003 -+++ dbs.h Sun Jul 20 19:16:48 2003 +--- dbs.h.orig 2002-07-25 12:24:10 UTC ++++ dbs.h @@ -1,3 +1,4 @@ +#include <unistd.h> #include <regex.h> diff --git a/www/ffproxy/files/patch-request.c b/www/ffproxy/files/patch-request.c new file mode 100644 index 000000000000..283c4db11c69 --- /dev/null +++ b/www/ffproxy/files/patch-request.c @@ -0,0 +1,47 @@ +--- request.c.orig 2004-12-31 08:59:54 UTC ++++ request.c +@@ -49,7 +49,7 @@ + + static int read_header(int, struct req *); + static char sgetc(int); +-static size_t getline(int, char[], int); ++static size_t get_line(int, char[], int); + static int do_request(int, struct req *); + + void +@@ -63,7 +63,7 @@ keep_alive: + (void) memset(&r, 0, sizeof(r)); + r.cl = clinfo; + +- if (getline(cl, buf, sizeof(buf)) < 1) ++ if (get_line(cl, buf, sizeof(buf)) < 1) + *buf = '\0'; + + if ((http_url(&r, buf)) == 0) { +@@ -189,7 +189,7 @@ read_header(int cl, struct req * r) + char *b, *p; + + i = 0; +- while ((len = getline(cl, buf, sizeof(buf))) > 0 && i < sizeof(r->header) - 1) { ++ while ((len = get_line(cl, buf, sizeof(buf))) > 0 && i < sizeof(r->header) - 1) { + b = buf; + while (isspace((int) *b) && *(b++) != '\0'); + if (*b == '\0') +@@ -228,7 +228,7 @@ sgetc(int s) + } + + static size_t +-getline(int s, char buf[], int len) ++get_line(int s, char buf[], int len) + { + int c; + size_t i; +@@ -493,7 +493,7 @@ do_request(int cl, struct req * r) + } + if (r->type != CONNECT) { + i = 0; +- while ((len = getline(s, buf, sizeof(buf))) > 0 && i < sizeof(r->header) - 1) { ++ while ((len = get_line(s, buf, sizeof(buf))) > 0 && i < sizeof(r->header) - 1) { + DEBUG(("do_request() => got remote header line: (%s)", buf)); + r->header[i] = (char *) my_alloc(len + 1); + (void) strcpy(r->header[i++], buf); diff --git a/www/ffproxy/files/patch-socket.c b/www/ffproxy/files/patch-socket.c index 68a7a3261363..6bbae4d3e680 100644 --- a/www/ffproxy/files/patch-socket.c +++ b/www/ffproxy/files/patch-socket.c @@ -1,6 +1,6 @@ ---- socket.c.orig Fri Dec 31 10:59:54 2004 -+++ socket.c Thu Nov 9 20:19:53 2006 -@@ -58,7 +58,7 @@ +--- socket.c.orig 2004-12-31 08:59:54 UTC ++++ socket.c +@@ -58,7 +58,7 @@ void open_socket(void) { extern struct cfg config; @@ -9,7 +9,7 @@ struct addrinfo hints[2], *res; struct clinfo *clinfo; struct pollfd s[2]; -@@ -135,7 +135,6 @@ +@@ -135,7 +135,6 @@ open_socket(void) if (config.bind_ipv6) info("waiting for requests on %s port %d (IPv6)", *config.ipv6 ? config.ipv6 : "(any)", config.port); @@ -17,7 +17,7 @@ config.ccount = 0; cl = 0; isipv4 = config.bind_ipv4; -@@ -160,13 +159,14 @@ +@@ -160,13 +159,14 @@ open_socket(void) } } else st = s[0].fd; |