]> granicus.if.org Git - curl/commitdiff
smtp_connect: always provide host name buffer
authorDaniel Stenberg <daniel@haxx.se>
Fri, 30 Jul 2010 20:36:31 +0000 (22:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 30 Jul 2010 20:36:31 +0000 (22:36 +0200)
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.

lib/smtp.c

index 1133fe527a60d57627d5fbc02ca9cd956c84b852..c42b7208f56c540027dff03488c4edb13e70f1c0 100644 (file)
@@ -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 */