summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/gethstnm.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/sysdeps/linux/common/gethstnm.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/sysdeps/linux/common/gethstnm.c')
-rw-r--r--libc/sysdeps/linux/common/gethstnm.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/gethstnm.c b/libc/sysdeps/linux/common/gethstnm.c
index cb6e5efce..c932d239c 100644
--- a/libc/sysdeps/linux/common/gethstnm.c
+++ b/libc/sysdeps/linux/common/gethstnm.c
@@ -1,12 +1,20 @@
-#define uname __uname
+/*
+ * 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>
-int attribute_hidden
-__gethostname(char *name, size_t len)
+libc_hidden_proto(strlen)
+libc_hidden_proto(strcpy)
+libc_hidden_proto(uname)
+
+int
+gethostname(char *name, size_t len)
{
struct utsname uts;
@@ -17,11 +25,12 @@ __gethostname(char *name, size_t len)
if (uname(&uts) == -1) return -1;
- if (__strlen(uts.nodename)+1 > len) {
+ if (strlen(uts.nodename)+1 > len) {
__set_errno(EINVAL);
return -1;
}
- __strcpy(name, uts.nodename);
+ strcpy(name, uts.nodename);
return 0;
}
-strong_alias(__gethostname,gethostname)
+libc_hidden_proto(gethostname)
+libc_hidden_def(gethostname)