aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-08-02 22:51:24 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-08-02 22:51:24 +0200
commit687df5c8c39c370a59999b9afc0917d808d978b7 (patch)
tree6fc304cad6f38b128b7837cf256c96aaf9a8cb62 /tests/libtest
parent40253e32feab237fa89cbd7be7367ef1f8990148 (diff)
sethostname: provide local prototype for gethostname
This is only to avoid warnings on some systems.
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/sethostname.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/libtest/sethostname.c b/tests/libtest/sethostname.c
index 33fa90da6..d050f18d6 100644
--- a/tests/libtest/sethostname.c
+++ b/tests/libtest/sethostname.c
@@ -17,8 +17,10 @@
*
* Since some systems think this prototype doesn't match the system provided
* function, we AVOID including unistd.h or other headers that may include the
- * original prototype!
+ * original prototype! We provide our own instead (to avoid warnings).
*/
+int gethostname(char *name, size_t namelen);
+
int gethostname(char *name, size_t namelen)
{
const char *force_hostname = getenv(GETHOSTNAME_ENV_VAR);