about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/gethostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/gethostname.c')
-rw-r--r--sysdeps/unix/sysv/linux/gethostname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/gethostname.c b/sysdeps/unix/sysv/linux/gethostname.c
index 0e3ca57aca..94a460185e 100644
--- a/sysdeps/unix/sysv/linux/gethostname.c
+++ b/sysdeps/unix/sysv/linux/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ __gethostname (name, len)
   node_len = strlen (buf.nodename) + 1;
   if (node_len > len)
     {
-      __set_errno (EINVAL);
+      __set_errno (ENAMETOOLONG);
       return -1;
     }