From 053a88680a00e9a9bda7ba7400ea0216342c1693 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Tue, 10 May 2016 11:09:26 +0000 Subject: [PATCH] Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Obtained from: OpenBSD --- contrib/pf/ftp-proxy/ftp-proxy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/pf/ftp-proxy/ftp-proxy.c b/contrib/pf/ftp-proxy/ftp-proxy.c index 26de75a688dd..04d749dd0fff 100644 --- a/contrib/pf/ftp-proxy/ftp-proxy.c +++ b/contrib/pf/ftp-proxy/ftp-proxy.c @@ -103,7 +103,7 @@ void client_read(struct bufferevent *, void *); int drop_privs(void); void end_session(struct session *); void exit_daemon(void); -int getline(char *, size_t *); +int get_line(char *, size_t *); void handle_connection(const int, short, void *); void handle_signal(int, short, void *); struct session * init_session(void); @@ -249,7 +249,7 @@ client_read(struct bufferevent *bufev, void *arg) buf_avail); s->cbuf_valid += clientread; - while ((n = getline(s->cbuf, &s->cbuf_valid)) > 0) { + while ((n = get_line(s->cbuf, &s->cbuf_valid)) > 0) { logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf); if (!client_parse(s)) { end_session(s); @@ -343,7 +343,7 @@ exit_daemon(void) } int -getline(char *buf, size_t *valid) +get_line(char *buf, size_t *valid) { size_t i; @@ -1087,7 +1087,7 @@ server_read(struct bufferevent *bufev, void *arg) buf_avail); s->sbuf_valid += srvread; - while ((n = getline(s->sbuf, &s->sbuf_valid)) > 0) { + while ((n = get_line(s->sbuf, &s->sbuf_valid)) > 0) { logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf); if (!server_parse(s)) { end_session(s);