]> granicus.if.org Git - curl/commitdiff
sethostname: provide local prototype for gethostname
authorDaniel Stenberg <daniel@haxx.se>
Mon, 2 Aug 2010 20:51:24 +0000 (22:51 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 2 Aug 2010 20:51:24 +0000 (22:51 +0200)
This is only to avoid warnings on some systems.

tests/libtest/sethostname.c

index 33fa90da6e4863cb6795e48f463354e7f819399f..d050f18d65a603b712595fd96b448f38e77e8876 100644 (file)
  *
  * 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);