summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-08-02 11:54:52 +0200
committerBruno Haible <bruno@clisp.org>2009-08-02 11:54:52 +0200
commit33bcc047c11586cff59d22566226e847e0c23954 (patch)
tree0319bf42a4f720254a05943586a4f60fdc43a808 /modules
parent83c5d5d57bbaa15ad770ff0166e9fc6319402d76 (diff)
downloadgnulib-33bcc047c11586cff59d22566226e847e0c23954.tar.gz
Implement gethostname correctly for native Windows.
Diffstat (limited to 'modules')
-rw-r--r--modules/gethostname7
-rw-r--r--modules/gethostname-tests1
2 files changed, 7 insertions, 1 deletions
diff --git a/modules/gethostname b/modules/gethostname
index 796dc6fea9..e21afe6a9c 100644
--- a/modules/gethostname
+++ b/modules/gethostname
@@ -4,10 +4,12 @@ gethostname() function: Return machine's hostname.
Files:
lib/gethostname.c
m4/gethostname.m4
-m4/sys_socket_h.m4
+lib/w32sock.h
Depends-on:
unistd
+sys_socket
+errno
configure.ac:
gl_FUNC_GETHOSTNAME
@@ -18,6 +20,9 @@ Makefile.am:
Include:
<unistd.h>
+Link:
+$(GETHOSTNAME_LIB)
+
License:
LGPLv2+
diff --git a/modules/gethostname-tests b/modules/gethostname-tests
index 236ca58519..ea17aba2d9 100644
--- a/modules/gethostname-tests
+++ b/modules/gethostname-tests
@@ -8,3 +8,4 @@ configure.ac:
Makefile.am:
TESTS += test-gethostname
check_PROGRAMS += test-gethostname
+test_gethostname_LDADD = $(LDADD) @GETHOSTNAME_LIB@