]> granicus.if.org Git - procps-ng/commitdiff
watch: define HOST_NAME_MAX
authorCraig Small <csmall@enc.com.au>
Sun, 10 Jul 2016 22:41:21 +0000 (08:41 +1000)
committerCraig Small <csmall@enc.com.au>
Sun, 10 Jul 2016 22:41:21 +0000 (08:41 +1000)
Those infernal arches of kfreebsd-i386 (not -amd64) don't define
HOST_NAME_MAX. This patch is a work-around for those systems with
lacking include files.

NEWS
watch.c

diff --git a/NEWS b/NEWS
index b28bbe407fad25d98687bc133cb01bfdf3f282a7..dd69166ea80dba626bcc0bbb4fe561729aee8c0d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+procps-ng-NEXT
+----------------
+  * watch: define HOST_NAME_MAX where not defined          Debian #830734
+
 procps-ng-3.3.12
 ----------------
   * libprocps API 6:0:0
diff --git a/watch.c b/watch.c
index 24defcf1d4b707b5d08d9bf2d9d5e557ac193f65..69c8fc80c1dc44ea57588604f570e7046c4a5d25 100644 (file)
--- a/watch.c
+++ b/watch.c
 # define isprint(x) ( (x>=' '&&x<='~') || (x>=0xa0) )
 #endif
 
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 64
+#endif
+
 /* Boolean command line options */
 static int flags;
 #define WATCH_DIFF     (1 << 1)