1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

Prevent collision with getline(3)

While here regen patches
This commit is contained in:
Baptiste Daroussin 2016-05-13 19:42:03 +00:00
parent 957086cfe8
commit 93dcef6960
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415144
4 changed files with 57 additions and 10 deletions

View File

@ -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

View File

@ -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>

View File

@ -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);

View File

@ -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;