From: Daniel Stenberg Date: Fri, 30 Jul 2010 20:36:31 +0000 (+0200) Subject: smtp_connect: always provide host name buffer X-Git-Tag: curl-7_21_1~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=314117cbf180dc6bc333621052f6d8c2e9a25ac7;p=curl smtp_connect: always provide host name buffer Previously the host name buffer was only used if gethostname() exists, but since we converted that into a curl private function that function always exists and will be used so the buffer needs to exist for all cases/systems. --- diff --git a/lib/smtp.c b/lib/smtp.c index 1133fe527..c42b7208f 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1042,10 +1042,7 @@ static CURLcode smtp_connect(struct connectdata *conn, struct pingpong *pp=&smtpc->pp; const char *path = conn->data->state.path; int len; - -#ifdef HAVE_GETHOSTNAME - char localhost[1024 + 1]; -#endif + char localhost[1024 + 1]; *done = FALSE; /* default to not done yet */