summaryrefslogtreecommitdiffstats
path: root/gl/gethostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/gethostname.c')
-rw-r--r--gl/gethostname.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gl/gethostname.c b/gl/gethostname.c
index eedc40e..169dd4e 100644
--- a/gl/gethostname.c
+++ b/gl/gethostname.c
@@ -1,11 +1,11 @@
1/* gethostname emulation for SysV and POSIX.1. 1/* gethostname emulation for SysV and POSIX.1.
2 2
3 Copyright (C) 1992, 2003, 2006 Free Software Foundation, Inc. 3 Copyright (C) 1992, 2003, 2006, 2008 Free Software Foundation, Inc.
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option) 7 the Free Software Foundation; either version 3 of the License, or
8 any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,8 +13,7 @@
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation, 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 17
19/* David MacKenzie <djm@gnu.ai.mit.edu> */ 18/* David MacKenzie <djm@gnu.ai.mit.edu> */
20 19
@@ -24,6 +23,8 @@
24# include <sys/utsname.h> 23# include <sys/utsname.h>
25#endif 24#endif
26 25
26#include <string.h>
27
27/* Put up to LEN chars of the host name into NAME. 28/* Put up to LEN chars of the host name into NAME.
28 Null terminate it if the name is shorter than LEN. 29 Null terminate it if the name is shorter than LEN.
29 Return 0 if ok, -1 if error. */ 30 Return 0 if ok, -1 if error. */