aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/Makefile.inc2
-rw-r--r--tests/libtest/sethostname.h9
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index f5a5ddeb4..ce230c12a 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -15,7 +15,7 @@ noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 \
lib568 lib569 lib570 lib571 lib572 lib573 chkhostname
chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
-chkhostname_LDADD =
+chkhostname_LDADD = @CURL_NETWORK_LIBS@
chkhostname_DEPENDENCIES =
chkhostname_CFLAGS = $(AM_CFLAGS)
diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h
index 458a8f0cf..83034a536 100644
--- a/tests/libtest/sethostname.h
+++ b/tests/libtest/sethostname.h
@@ -21,5 +21,12 @@
# endif
#endif
-LIBHOSTNAME_EXTERN int gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);
+#ifdef USE_WINSOCK
+# define FUNCALLCONV __stdcall
+#else
+# define FUNCALLCONV
+#endif
+
+LIBHOSTNAME_EXTERN int FUNCALLCONV
+ gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);