projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
[gnulib.git]
/
lib
/
gethostname.c
diff --git
a/lib/gethostname.c
b/lib/gethostname.c
index
2622c8e
..
3616810
100644
(file)
--- a/
lib/gethostname.c
+++ b/
lib/gethostname.c
@@
-1,5
+1,5
@@
/* gethostname emulation for SysV and POSIX.1.
/* gethostname emulation for SysV and POSIX.1.
- Copyright (C) 1992, 200
0
Free Software Foundation, Inc.
+ Copyright (C) 1992, 200
3
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
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. */
Null terminate it if the name is shorter than LEN.
Return 0 if ok, -1 if error. */
+#include <stddef.h>
+
int
int
-gethostname (name, len)
- char *name;
- int len;
+gethostname (char *name, size_t len)
{
#ifdef HAVE_UNAME
struct utsname uts;
{
#ifdef HAVE_UNAME
struct utsname uts;