]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/thttpd/0001-getline.patch
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / thttpd / 0001-getline.patch
1 Fix glibc/eglibc getline() conflicting functions.
2
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
4 ---
5
6 diff -Nura thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
7 --- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-18 21:08:08.000000000 -0300
8 +++ thttpd-2.25b/extras/htpasswd.c      2011-11-25 11:42:47.198582812 -0300
9 @@ -49,7 +49,7 @@
10      while((line[y++] = line[x++]));
11  }
12  
13 -static int getline(char *s, int n, FILE *f) {
14 +static int get_line(char *s, int n, FILE *f) {
15      register int i=0;
16  
17      while(1) {
18 @@ -189,7 +189,7 @@
19      strcpy(user,argv[2]);
20  
21      found = 0;
22 -    while(!(getline(line,MAX_STRING_LEN,f))) {
23 +    while(!(get_line(line,MAX_STRING_LEN,f))) {
24          if(found || (line[0] == '#') || (!line[0])) {
25              putline(tfp,line);
26              continue;