From: Ken Raeburn Date: Fri, 16 Jun 2006 00:10:08 +0000 (+0000) Subject: ftpd's getline conflicts with current glibc headers X-Git-Tag: krb5-1.5-beta1~16 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b3cbc18f06ad2fbc823483bed852f06425174384;p=krb5.git ftpd's getline conflicts with current glibc headers Reported by Ubaidul Khan on kerberos@mit this date. GNU libc includes a function getline with an incompatible prototype. It hasn't caused problems for MIT on RHEL 4 (glibc 2.3.4), but apparently FC5 has a newer set of headers in which it does. * ftpcmd.y (getline): Renamed to ftpd_getline. Declarations and callers changed. * ftpd.c (getline): Remove duplicate declaration. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18153 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gssftp/ftpd/ftpcmd.y b/src/appl/gssftp/ftpd/ftpcmd.y index 096014bd2..30bced06a 100644 --- a/src/appl/gssftp/ftpd/ftpcmd.y +++ b/src/appl/gssftp/ftpd/ftpcmd.y @@ -971,7 +971,7 @@ urgsafe_getc(f) * getline - a hacked up version of fgets to ignore TELNET escape codes. */ char * -getline(s, n, iop) +ftpd_getline(s, n, iop) char *s; int n; register FILE *iop; @@ -1213,7 +1213,7 @@ yylex() case CMD: (void) signal(SIGALRM, toolong); (void) alarm((unsigned) timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + if (ftpd_getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { reply(221, "You could at least say goodbye."); dologout(0); } diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index 6655e0d62..71744a57f 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -176,7 +176,6 @@ extern char version[]; extern char *home; /* pointer to home directory for glob */ extern FILE *ftpd_popen(), *fopen(), *freopen(); extern int ftpd_pclose(), fclose(); -extern char *getline(); extern char cbuf[]; extern off_t restart_point; @@ -2139,7 +2138,7 @@ myoob(sig) if (!transflag) return; cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + if (ftpd_getline(cp, sizeof(tmpline), stdin) == NULL) { reply(221, "You could at least say goodbye."); dologout(0); } diff --git a/src/appl/gssftp/ftpd/ftpd_var.h b/src/appl/gssftp/ftpd/ftpd_var.h index 07fb14a63..8d833e4ec 100644 --- a/src/appl/gssftp/ftpd/ftpd_var.h +++ b/src/appl/gssftp/ftpd/ftpd_var.h @@ -89,7 +89,7 @@ extern void lreply(int, char *, ...) /* ftpcmd.y */ void upper(char *); -char *getline(char *, int, FILE *); +char *ftpd_getline(char *, int, FILE *); #endif /* FTPD_VAR_H__ */ /* popen.c */