From: Daniel Stenberg Date: Mon, 2 Aug 2010 20:51:24 +0000 (+0200) Subject: sethostname: provide local prototype for gethostname X-Git-Tag: curl-7_21_1~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=687df5c8c39c370a59999b9afc0917d808d978b7;p=thirdparty%2Fcurl.git sethostname: provide local prototype for gethostname This is only to avoid warnings on some systems. --- diff --git a/tests/libtest/sethostname.c b/tests/libtest/sethostname.c index 33fa90da6e..d050f18d65 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);