aboutsummaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-09-24 23:55:53 +0000
committerYang Tse <yangsita@gmail.com>2006-09-24 23:55:53 +0000
commit6ebd5e1761e7e431706e65083293de8ae187d8df (patch)
treed94217305af8e494c652e46550d8f413e66cf980 /lib/socks.c
parent2723eda1e406beb3c62d792931a0b52a56a609ca (diff)
Compiler warning fix
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/socks.c b/lib/socks.c
index e0586f812..fb6f7fe25 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -23,6 +23,15 @@
#include "setup.h"
+#include <string.h>
+
+#ifdef NEED_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
#include "urldata.h"
#include "sendf.h"
#include "strequal.h"
@@ -541,7 +550,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
code = Curl_write(conn, sock, (char *)socksreq, packetsize, &written);
if ((code != CURLE_OK) || (written != packetsize)) {
failf(data, "Failed to send SOCKS5 connect request.");
- return 1;
+ return CURLE_COULDNT_CONNECT;
}
result = blockread_all(conn, sock, (char *)socksreq, packetsize,