summaryrefslogtreecommitdiffstats
path: root/login-utils/wall.c
diff options
context:
space:
mode:
authorKarel Zak2007-11-26 14:45:55 +0100
committerKarel Zak2007-11-26 14:50:34 +0100
commit06038c3d1d674d1f17a6d42640d363f3a4898bba (patch)
treea6eec55829f7ce379e1f6daee3ed18fd5b407624 /login-utils/wall.c
parentagetty: cleanup MAXHOSTNAMELEN (diff)
downloadkernel-qcow2-util-linux-06038c3d1d674d1f17a6d42640d363f3a4898bba.tar.gz
kernel-qcow2-util-linux-06038c3d1d674d1f17a6d42640d363f3a4898bba.tar.xz
kernel-qcow2-util-linux-06038c3d1d674d1f17a6d42640d363f3a4898bba.zip
wall: cleanup MAXHOSTNAMELEN
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/wall.c')
-rw-r--r--login-utils/wall.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/login-utils/wall.c b/login-utils/wall.c
index c9893d7e4..42856ae38 100644
--- a/login-utils/wall.c
+++ b/login-utils/wall.c
@@ -67,6 +67,14 @@ void makemsg __P((char *));
#define IGNOREUSER "sleeper"
+#ifndef MAXHOSTNAMELEN
+# ifdef HOST_NAME_MAX
+# define MAXHOSTNAMELEN HOST_NAME_MAX
+# else
+# define MAXHOSTNAMELEN 64
+# endif
+#endif
+
int nobanner;
int mbufsize;
char *mbuf;