* ftpd had a function getline() with non standards compatible parameters.

* This fixes the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38881 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-10-04 14:00:44 +00:00
parent 80c5b9b5ee
commit f1c26ec658
3 changed files with 10 additions and 10 deletions

View File

@ -46,7 +46,7 @@ void fatalerror(char *);
void ftpd_logwtmp(char *, char *, struct sockaddr *addr);
int ftpd_pclose(FILE *);
FILE *ftpd_popen(char *, char *);
char *getline(char *, int, FILE *);
char *ftpd_getline(char *, int, FILE *);
void lreply(int, const char *, ...) __printflike(2, 3);
void makedir(char *);
void nack(char *);

View File

@ -542,7 +542,7 @@ cmd
case MODE_S:
reply(200, "MODE S accepted.");
break;
default:
reply(502, "Unimplemented MODE type.");
}
@ -1194,10 +1194,10 @@ lookup(struct tab *p, char *cmd)
#include <arpa/telnet.h>
/*
* getline - a hacked up version of fgets to ignore TELNET escape codes.
* ftpd_getline - a hacked up version of fgets to ignore TELNET escape codes.
*/
char *
getline(char *s, int n, FILE *iop)
ftpd_getline(char *s, int n, FILE *iop)
{
int c;
register char *cs;
@ -1305,7 +1305,7 @@ yylex(void)
case CMD:
(void) signal(SIGALRM, toolong);
(void) alarm(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);
}

View File

@ -1062,7 +1062,7 @@ user(char *name)
reply(530, "Sorry, only anonymous ftp allowed.");
return;
}
if ((pw = sgetpwnam(name))) {
if ((shell = pw->pw_shell) == NULL || *shell == 0)
shell = _PATH_BSHELL;
@ -2838,7 +2838,7 @@ myoob(void)
return (0);
}
cp = tmpline;
if (getline(cp, 7, stdin) == NULL) {
if (ftpd_getline(cp, 7, stdin) == NULL) {
reply(221, "You could at least say goodbye.");
dologout(0);
}
@ -2930,7 +2930,7 @@ passive(void)
#endif
else
goto pasv_error;
p = (char *) &pasv_addr.su_port;
#define UC(b) (((int) b) & 0xff)
@ -2989,7 +2989,7 @@ long_passive(char *cmd, int pf)
return;
}
}
pdata = socket(ctrl_addr.su_family, SOCK_STREAM, 0);
if (pdata < 0) {
perror_reply(425, "Can't open passive connection");
@ -3128,7 +3128,7 @@ guniquefd(char *local, char **name)
/* -4 is for the .nn<null> we put on the end below */
(void) snprintf(new, sizeof(new) - 4, "%s", local);
cp = new + strlen(new);
/*
/*
* Don't generate dotfile unless requested explicitly.
* This covers the case when basename gets truncated off
* by buffer size.