diff options
author | Khem Raj <kraj@mvista.com> | 2008-06-27 04:01:29 +0000 |
---|---|---|
committer | Khem Raj <kraj@mvista.com> | 2008-06-27 04:01:29 +0000 |
commit | d3f9546960f56c05624e2932a899db7f1d38a480 (patch) | |
tree | 6c63cec6c57ad8060a4b6ef983b3b24ece5fc87c /libc/sysdeps/linux/common/gethstnm.c | |
parent | da3e789d079c47fea519270269e0c63dd5d497e2 (diff) | |
download | uClibc-alpine-d3f9546960f56c05624e2932a899db7f1d38a480.tar.bz2 uClibc-alpine-d3f9546960f56c05624e2932a899db7f1d38a480.tar.xz |
Sync build machinery stuff from trunk. Some more fixed for mips nptl port
Diffstat (limited to 'libc/sysdeps/linux/common/gethstnm.c')
-rw-r--r-- | libc/sysdeps/linux/common/gethstnm.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/libc/sysdeps/linux/common/gethstnm.c b/libc/sysdeps/linux/common/gethstnm.c deleted file mode 100644 index fc5a72c8d..000000000 --- a/libc/sysdeps/linux/common/gethstnm.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include <string.h> -#include <unistd.h> -#include <sys/utsname.h> -#include <errno.h> - -libc_hidden_proto(gethostname) - -libc_hidden_proto(strlen) -libc_hidden_proto(strcpy) -libc_hidden_proto(uname) - -int -gethostname(char *name, size_t len) -{ - struct utsname uts; - - if (name == NULL) { - __set_errno(EINVAL); - return -1; - } - - if (uname(&uts) == -1) return -1; - - if (strlen(uts.nodename)+1 > len) { - __set_errno(EINVAL); - return -1; - } - strcpy(name, uts.nodename); - return 0; -} -libc_hidden_def(gethostname) |