This has been filed upstream at:
and fixed in
These changes should be available in mtr 0.87.
--- mtr-0.86/configure.ac Tue Dec 9 03:20:57 2014
+++ mtr-0.86/configure.ac Tue Mar 24 15:03:00 2015
@@ -20,20 +20,11 @@
-# We don't refer to any symbols in termcap, but -lcurses on SunOS does.
-# We have to trust the linker not to mess things up... (It should not
-# pull in anything if we don't refer to anything in the lib).
-AC_CHECK_LIB(termcap, tgetent)
-AC_CHECK_LIB(tinfo, tgetent)
+AC_SEARCH_LIBS(initscr, [ncurses curses cursesX], ,
+ AC_MSG_WARN(Building without curses display support)
+ AC_DEFINE(NO_CURSES, 1, [Define if you don't have the curses libraries available.])
+ CURSES_OBJ=)
-AC_CHECK_FUNC(initscr, ,
- AC_CHECK_LIB(ncurses, initscr, ,
- AC_CHECK_LIB(curses, initscr, ,
- AC_CHECK_LIB(cursesX, initscr, ,
- AC_MSG_WARN(Building without curses display support)
- AC_DEFINE(NO_CURSES, 1, Define if you don't have the curses libraries available.)
- CURSES_OBJ=))))
-
AC_CHECK_FUNCS(attron fcntl)
AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
--- mtr-0.86/mtr.c Tue Dec 9 03:20:57 2014
+++ mtr-0.86/mtr.c Fri Mar 20 09:43:55 2015
@@ -89,7 +89,7 @@
int maxTTL = 30; /* inline with traceroute */
/* end ttl window stuff. */
int remoteport = 80; /* for TCP tracing */
-int timeout = 10 * 1000000; /* for TCP tracing */
+int tcp_timeout = 10 * 1000000; /* for TCP tracing */
/* default display field(defined by key in net.h) and order */
@@ -454,8 +454,8 @@
}
break;
case 'Z':
- timeout = atoi(optarg);
- timeout *= 1000000;
+ tcp_timeout = atoi(optarg);
+ tcp_timeout *= 1000000;
break;
case '4':
af = AF_INET;
--- mtr-0.86/net.c Fri Mar 20 09:43:55 2015
+++ mtr-0.86/net.c Fri Mar 20 09:43:55 2015
@@ -209,7 +209,7 @@
extern int af; /* address family of remote target */
extern int mtrtype; /* type of query packet used */
extern int remoteport; /* target port for TCP tracing */
-extern int timeout; /* timeout for TCP connections */
+extern int tcp_timeout; /* timeout for TCP connections */
#ifdef SO_MARK
extern int mark; /* SO_MARK to set for ping packet*/
#endif
@@ -1559,7 +1559,7 @@
}
if (fd > 0) {
utime = sequence[at].time.tv_sec * 1000000L + sequence[at].time.tv_usec;
- if (unow - utime > timeout) {
+ if (unow - utime > tcp_timeout) {
close(fd);
sequence[at].socket = 0;
}