2 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
9 #include <sys/utsname.h>
15 gethostname(char *name, size_t len)
24 if (uname(&uts) == -1) return -1;
26 if (strlen(uts.nodename)+1 > len) {
30 strcpy(name, uts.nodename);
33 libc_hidden_def(gethostname)