aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-08-09 05:45:11 +0200
committerYang Tse <yangsita@gmail.com>2010-08-09 05:45:11 +0200
commit50a1d5ee1c127d76ea3316f86d53accb66bc0b22 (patch)
tree374e309bb4c1dbfe4e9fbbac5cdbc4ca91d01e6b /tests
parent6ccbd1bee4470da4fc73e46dd27c809dbcdf8e2e (diff)
build: libhostname and chkhostname linkage adjustments followup
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);