Date: Fri, 13 May 2016 19:42:04 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415144 - head/www/ffproxy/files Message-ID: <201605131942.u4DJg4Uf076404@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Fri May 13 19:42:03 2016 New Revision: 415144 URL: https://svnweb.freebsd.org/changeset/ports/415144 Log: Prevent collision with getline(3) While here regen patches Added: head/www/ffproxy/files/patch-request.c (contents, props changed) Modified: head/www/ffproxy/files/patch-Makefile.in head/www/ffproxy/files/patch-dbs.h head/www/ffproxy/files/patch-socket.c Modified: head/www/ffproxy/files/patch-Makefile.in ============================================================================== --- head/www/ffproxy/files/patch-Makefile.in Fri May 13 19:40:11 2016 (r415143) +++ head/www/ffproxy/files/patch-Makefile.in Fri May 13 19:42:03 2016 (r415144) @@ -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 Modified: head/www/ffproxy/files/patch-dbs.h ============================================================================== --- head/www/ffproxy/files/patch-dbs.h Fri May 13 19:40:11 2016 (r415143) +++ head/www/ffproxy/files/patch-dbs.h Fri May 13 19:42:03 2016 (r415144) @@ -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> Added: head/www/ffproxy/files/patch-request.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/ffproxy/files/patch-request.c Fri May 13 19:42:03 2016 (r415144) @@ -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); Modified: head/www/ffproxy/files/patch-socket.c ============================================================================== --- head/www/ffproxy/files/patch-socket.c Fri May 13 19:40:11 2016 (r415143) +++ head/www/ffproxy/files/patch-socket.c Fri May 13 19:42:03 2016 (r415144) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605131942.u4DJg4Uf076404>