Debian Codegraph @

debian/patches/04_ftbfs-eglibc-2-10

raw
1 Description: Patch which fix FTBFS with eglibc 2.10
2 Author: Nicolas Van Wambeke <[email protected]>
3 Bug-Debian: http://bugs.debian.org/547402
4 Last-Update: 2009-09-20
5 --- a/request.c
6 +++ b/request.c
7 @@ -49,7 +49,7 @@
8
9 static int read_header(int, struct req *);
10 static char sgetc(int);
11 -static size_t getline(int, char[], int);
12 +static size_t get_line(int, char[], int);
13 static int do_request(int, struct req *);
14
15 void
16 @@ -63,7 +63,7 @@
17 (void) memset(&r, 0, sizeof(r));
18 r.cl = clinfo;
19
20 - if (getline(cl, buf, sizeof(buf)) < 1)
21 + if (get_line(cl, buf, sizeof(buf)) < 1)
22 *buf = '\0';
23
24 if ((http_url(&r, buf)) == 0) {
25 @@ -189,7 +189,7 @@
26 char *b, *p;
27
28 i = 0;
29 - while ((len = getline(cl, buf, sizeof(buf))) > 0 && i < MAX_HEADERS - 1) {
30 + while ((len = get_line(cl, buf, sizeof(buf))) > 0 && i < MAX_HEADERS - 1) {
31 b = buf;
32 while (isspace((int) *b) && *(b++) != '\0');
33 if (*b == '\0')
34 @@ -228,7 +228,7 @@
35 }
36
37 static size_t
38 -getline(int s, char buf[], int len)
39 +get_line(int s, char buf[], int len)
40 {
41 int c;
42 size_t i;
43 @@ -493,7 +493,7 @@
44 }
45 if (r->type != CONNECT) {
46 i = 0;
47 - while ((len = getline(s, buf, sizeof(buf))) > 0 && i < MAX_HEADERS - 1) {
48 + while ((len = get_line(s, buf, sizeof(buf))) > 0 && i < MAX_HEADERS - 1) {
49 DEBUG(("do_request() => got remote header line: (%s)", buf));
50 r->header[i] = (char *) my_alloc(len + 1);
51 (void) strcpy(r->header[i++], buf);