X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgethostname.c;h=3616810ff20ad437654fb9b930305aee6661d933;hb=d3aea660de14898af6f8f03d452f58b28126dabc;hp=3d66dc936052dd3229845f9732b6fed94c401add;hpb=783c1624bd8b027a65b3fba57d3213ccb1a6ddbd;p=gnulib.git diff --git a/lib/gethostname.c b/lib/gethostname.c index 3d66dc936..3616810ff 100644 --- a/lib/gethostname.c +++ b/lib/gethostname.c @@ -1,5 +1,5 @@ /* gethostname emulation for SysV and POSIX.1. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright (C) 1992, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,10 +29,10 @@ Null terminate it if the name is shorter than LEN. Return 0 if ok, -1 if error. */ +#include + int -gethostname (name, len) - char *name; - int len; +gethostname (char *name, size_t len) { #ifdef HAVE_UNAME struct utsname uts;