void-packages/srcpkgs/thttpd/patches/getline.patch
2013-04-23 09:44:03 +02:00

20 lines
667 B
Diff

--- extras/htpasswd.c.orig 2013-04-23 09:29:50.553761043 +0200
+++ extras/htpasswd.c 2013-04-23 09:30:08.017849725 +0200
@@ -49,7 +49,7 @@ static void getword(char *word, char *li
while((line[y++] = line[x++]));
}
-static int getline(char *s, int n, FILE *f) {
+static int mygetline(char *s, int n, FILE *f) {
register int i=0;
while(1) {
@@ -189,7 +189,7 @@ int main(int argc, char *argv[]) {
strcpy(user,argv[2]);
found = 0;
- while(!(getline(line,MAX_STRING_LEN,f))) {
+ while(!(mygetline(line,MAX_STRING_LEN,f))) {
if(found || (line[0] == '#') || (!line[0])) {
putline(tfp,line);
continue;