summaryrefslogtreecommitdiff
path: root/tests/unit/unit1609.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unit1609.c')
-rw-r--r--tests/unit/unit1609.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/unit1609.c b/tests/unit/unit1609.c
index 2b99bee9b..865c9e459 100644
--- a/tests/unit/unit1609.c
+++ b/tests/unit/unit1609.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -25,6 +25,10 @@
#include "connect.h"
#include "share.h"
+/* retrieves ip address and port from a sockaddr structure.
+ note it calls Curl_inet_ntop which sets errno on fail, not SOCKERRNO. */
+bool getaddressinfo(struct sockaddr *sa, char *addr, long *port);
+
#include "memdebug.h" /* LAST include file */
static struct Curl_easy *easy;
@@ -158,8 +162,8 @@ UNITTEST_START
if(!addr && !tests[i].address[j])
break;
- if(addr && !Curl_getaddressinfo(addr->ai_addr,
- ipaddress, &port)) {
+ if(addr && !getaddressinfo(addr->ai_addr,
+ ipaddress, &port)) {
fprintf(stderr, "%s:%d tests[%d] failed. getaddressinfo failed.\n",
__FILE__, __LINE__, i);
problem = true;