aboutsummaryrefslogtreecommitdiffstats
path: root/main/mtr
diff options
context:
space:
mode:
authorDaniel Isaksen <d@duniel.no>2017-09-17 19:59:45 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-09-21 05:34:23 +0000
commit9fb9327b865073ad05a955f3f58fdcfa6fcb1c33 (patch)
tree3ee3102a037e6840652b958516aa489eff2195e4 /main/mtr
parent9df0fe5251ee31f5c0baa1a71e57d2ca17bfbf25 (diff)
downloadaports-9fb9327b865073ad05a955f3f58fdcfa6fcb1c33.tar.bz2
aports-9fb9327b865073ad05a955f3f58fdcfa6fcb1c33.tar.xz
main/mtr: bump version to 0.92, fixes #3605 and removes DNS patch
[TT: use libcap, modernize, remove automake/autoconf regen, fix split]
Diffstat (limited to 'main/mtr')
-rw-r--r--main/mtr/0001-dns-allow-disable-dns-during-compile-time.patch196
-rw-r--r--main/mtr/APKBUILD68
-rw-r--r--main/mtr/mtr-gtk.desktop1
-rw-r--r--main/mtr/mtr-res_mkquery.patch374
4 files changed, 27 insertions, 612 deletions
diff --git a/main/mtr/0001-dns-allow-disable-dns-during-compile-time.patch b/main/mtr/0001-dns-allow-disable-dns-during-compile-time.patch
deleted file mode 100644
index 46598c4976..0000000000
--- a/main/mtr/0001-dns-allow-disable-dns-during-compile-time.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From 32863554ab50dfee32a25e641399c31b7fe7357d Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 6 Jul 2012 13:33:54 +0000
-Subject: [PATCH] dns: allow disable dns during compile time
-
----
- configure.in | 14 +++++++++----
- dns.c | 65 ++++++++++++++++++++++++++++++++++++------------------------
- mtr.c | 10 +++++++++-
- 3 files changed, 58 insertions(+), 31 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 8474543..1f53f74 100644
---- a/configure.in
-+++ b/configure.in
-@@ -72,10 +72,16 @@ AC_CHECK_FUNC(gethostbyname, ,
- AC_CHECK_FUNCS(seteuid)
- # AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid))
-
--AC_CHECK_FUNC(res_mkquery, ,
-- AC_CHECK_LIB(bind, res_mkquery, ,
-- AC_CHECK_LIB(resolv, res_mkquery, ,
-- AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found)))))
-+AC_ARG_ENABLE([dns], AS_HELP_STRING([--disable-dns],[Disable use of DNS]))
-+
-+AS_IF([test "x$enable_dns" != "xno"],
-+ AC_CHECK_FUNC(res_mkquery, ,
-+ AC_CHECK_LIB(bind, res_mkquery, ,
-+ AC_CHECK_LIB(resolv, res_mkquery, ,
-+ AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found))))),
-+ [AC_DEFINE([NO_DNS], [1], [Disable use of DNS])]
-+)
-+
- # This next line would override the just detected-or-not -lresolv.
- # This apparently hurts BSD. And it's bad practise. So it should go.
- # However, it probably didn't get added for nothing..... Holler if
-diff --git a/dns.c b/dns.c
-index 512da97..e85fcb3 100644
---- a/dns.c
-+++ b/dns.c
-@@ -48,6 +48,7 @@
- #include "mtr.h"
- #include "dns.h"
- #include "net.h"
-+#include "config.h"
-
- /* OSX Needs this. I don't know how to enable this for them automatically.
- * Should be easy with autoconf. Please submit a patch if you know
-@@ -58,6 +59,11 @@
- #endif
-
-
-+extern int af;
-+int use_dns = 1;
-+
-+#ifndef NO_DNS
-+
- #ifdef NO_STRERROR
- extern int sys_nerr;
- extern char *sys_errlist[];
-@@ -69,7 +75,6 @@ extern char *sys_errlist[];
- extern int errno;
- #endif
-
--extern int af;
-
- /* Defines */
-
-@@ -307,8 +312,6 @@ char stackstring[1024+1];
-
- char nullstring[] = "";
-
--int use_dns = 1;
--
- #ifdef res_ninit
- #define MY_RES_INIT() res_ninit(&myres);
- #define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
-@@ -451,18 +454,6 @@ void clearset(fd_set *set)
- }
-
-
--char *strlongip(ip_t * ip)
--{
--#ifdef ENABLE_IPV6
-- static char buf[INET6_ADDRSTRLEN];
--
-- return (char *) inet_ntop( af, ip, buf, sizeof buf );
--#else
-- return inet_ntoa( *ip );
--#endif
--}
--
--
- int longipstr( char *s, ip_t *dst, int af )
- {
- #ifdef ENABLE_IPV6
-@@ -473,17 +464,6 @@ int longipstr( char *s, ip_t *dst, int af )
- }
-
-
--struct hostent * dns_forward(const char *name)
--{
-- struct hostent *host;
--
-- if ((host = gethostbyname(name)))
-- return host;
-- else
-- return NULL;
--}
--
--
- int dns_waitfd(void)
- {
- return resfd;
-@@ -1397,6 +1377,39 @@ void addr2ip6arpa( ip_t * ip, char * buf ) {
- }
- #endif
-
-+#else /* NO_DNS */
-+void dns_ack(void) {}
-+void dns_events(double *sinterval) {}
-+int dns_waitfd(void) { return 0; }
-+void dns_open(void) { use_dns = dns = 0; }
-+char *dns_lookup2(ip_t * ip) { return NULL; }
-+char *dns_lookup(ip_t * ip) { return strlongip (ip); }
-+
-+#endif /* NO_DNS */
-+
-+struct hostent * dns_forward(const char *name)
-+{
-+ struct hostent *host;
-+
-+ if ((host = gethostbyname(name)))
-+ return host;
-+ else
-+ return NULL;
-+}
-+
-+
-+char *strlongip(ip_t * ip)
-+{
-+#ifdef ENABLE_IPV6
-+ static char buf[INET6_ADDRSTRLEN];
-+
-+ return (char *) inet_ntop( af, ip, buf, sizeof buf );
-+#else
-+ return inet_ntoa( *ip );
-+#endif
-+}
-+
-+
- /* Resolve an IP address to a hostname. */
- struct hostent *addr2host( const char *addr, int af ) {
- int len = 0;
-diff --git a/mtr.c b/mtr.c
-index 5f1b651..1fc3873 100644
---- a/mtr.c
-+++ b/mtr.c
-@@ -143,7 +143,9 @@ void parse_arg (int argc, char **argv)
- { "bitpattern", 1, 0, 'b' },/* overload b>255, ->rand(0,255) */
- { "tos", 1, 0, 'Q' }, /* typeof service (0,255) */
- { "mpls", 0, 0, 'e' },
-+#ifndef NO_DNS
- { "no-dns", 0, 0, 'n' },
-+#endif
- { "address", 1, 0, 'a' },
- { "first-ttl", 1, 0, 'f' }, /* -f & -m are borrowed from traceroute */
- { "max-ttl", 1, 0, 'm' },
-@@ -204,9 +206,11 @@ void parse_arg (int argc, char **argv)
- case 'e':
- enablempls = 1;
- break;
-+#ifndef NO_DNS
- case 'n':
- dns = 0;
- break;
-+#endif
- case 'i':
- WaitTime = atof (optarg);
- if (WaitTime <= 0.0) {
-@@ -382,7 +386,11 @@ int main(int argc, char **argv)
- if (PrintHelp) {
- printf("usage: %s [-hvrwctglspniu46] [--help] [--version] [--report]\n"
- "\t\t[--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]\n"
-- "\t\t[--raw] [--split] [--mpls] [--no-dns] [--address interface]\n" /* BL */
-+ "\t\t[--raw] [--split] [--mpls] "
-+#ifndef NO_DNS
-+ "[--no-dns] "
-+#endif
-+ "[--address interface]\n" /* BL */
- "\t\t[--psize=bytes/-s bytes]\n" /* ok */
- "\t\t[--report-wide|-w] [-u]\n" /* rew */
- "\t\t[--interval=SECONDS] HOSTNAME [PACKETSIZE]\n", argv[0]);
---
-1.7.11.1
-
diff --git a/main/mtr/APKBUILD b/main/mtr/APKBUILD
index c838b6061e..1d28d1207b 100644
--- a/main/mtr/APKBUILD
+++ b/main/mtr/APKBUILD
@@ -1,76 +1,60 @@
# Contributor: John Keith Hohm <john@hohm.net>
# Maintainer:
pkgname=mtr
-pkgver=0.82
-pkgrel=4
+pkgver=0.92
+pkgrel=0
pkgdesc="Full screen ncurses traceroute tool"
url="http://www.bitwizard.nl/mtr/"
arch="all"
license="GPL"
depends="ncurses"
depends_dev="ncurses-dev"
-makedepends="$depends_dev autoconf automake gtk+2.0-dev"
+makedepends="$depends_dev gtk+2.0-dev libcap-dev"
install=""
options="suid"
subpackages="$pkgname-doc $pkgname-gtk"
source="ftp://ftp.bitwizard.nl/$pkgname/$pkgname-$pkgver.tar.gz
- 0001-dns-allow-disable-dns-during-compile-time.patch
mtr-gtk.desktop
"
-
-_builddir="$srcdir/$pkgname-$pkgver"
-prepare() {
- local i
- cd "$_builddir"
- mkdir mtr curses gtk
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- aclocal && touch ChangeLog && autoconf && automake --add-missing
-}
+builddir="$srcdir/$pkgname-$pkgver"
build() {
- cd "$_builddir"
- cd "$_builddir"/curses
+ cd "$builddir"
+ mkdir -p mtr curses gtk
+
+ export GIT_DIR="$builddir"
+ cd "$builddir"/curses
../configure --prefix=/usr \
- --disable-dns \
- --without-gtk \
- || return 1
- make || return 1
+ --without-gtk
+ make
- cd "$_builddir"/gtk
+ cd "$builddir"/gtk
../configure --prefix=/usr \
- --disable-dns \
--with-gtk \
- --program-suffix=-gtk \
- || return 1
- make || return 1
+ --program-suffix=-gtk
+ make
+ unset GIT_DIR
}
package() {
- cd "$_builddir"/curses
- make DESTDIR="$pkgdir" install || return 1
- cd "$_builddir"/gtk
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"/curses
+ make DESTDIR="$pkgdir" install
+ cd "$builddir"/gtk
+ make DESTDIR="$pkgdir" install
install -D -m 644 "$srcdir"/mtr-gtk.desktop \
- "$pkgdir"/usr/share/applications/mtr-gtk.desktop \
- || return 1
- install -D -m 644 "$_builddir"/img/mtr_icon.xpm \
- "$pkgdir"/usr/share/pixmaps/mtr_icon.xpm || return 1
+ "$pkgdir"/usr/share/applications/mtr-gtk.desktop
+ install -D -m 644 "$builddir"/img/mtr_icon.xpm \
+ "$pkgdir"/usr/share/pixmaps/mtr_icon.xpm
}
gtk() {
pkgdesc="The GTK+ interface for mtr"
- mkdir -p "$subpkgdir"/usr/sbin \
- "$subpkgdir"/usr/share
- mv "$pkgdir"/usr/sbin/mtr-gtk "$subpkgdir"/usr/sbin/
+ mkdir -p "$subpkgdir"/usr/sbin "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/sbin/mtr*-gtk "$subpkgdir"/usr/sbin/
mv "$pkgdir"/usr/share/applications "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/pixmaps "$subpkgdir"/usr/share/
}
-sha512sums="122bc7aafe4441505046b331dcc42347e939fd974ece508dad04a7630904403eaec49ad6b2e483b5a94fc07726a14fad1405306c3729f1dc9b707ea66b529751 mtr-0.82.tar.gz
-76f82053f1cf4893ee3a2bb2bd55aea63f6df2780268cb71d07add71284bc91e3e10feb6981104d8f7e8edc4947281e442f0b40e6721dc44c9988764fc25772d 0001-dns-allow-disable-dns-during-compile-time.patch
-b61d60e3afac7a9ab5f0ea4cf45f73105acb2e0f7ad8460ab2f6c2a24fa229c52eecc17403eb9b57719c771e32d4f1930605623c9e80ec1245790bccf7f8af6b mtr-gtk.desktop"
+sha512sums="d362a418b6c17fd2d08da1ed9e033fa3330e4c0497e1bb0644f6193d23f4e20dd8ee181942c2a20ec0025a8b96c521394a21be5a1d9036f8a0a8c4cddfbe381f mtr-0.92.tar.gz
+ecf7543e0125fad6d3f17c30f29f1fc8a3b1e2e477802fe8464e436c3cdfa30d0630b8543cc3f022c475228e94ac8f92981df4d8fb08fe01d004be3d78d6da77 mtr-gtk.desktop"
diff --git a/main/mtr/mtr-gtk.desktop b/main/mtr/mtr-gtk.desktop
index 51d0cb8091..8a512aaae8 100644
--- a/main/mtr/mtr-gtk.desktop
+++ b/main/mtr/mtr-gtk.desktop
@@ -8,3 +8,4 @@ Icon=mtr_icon.xpm
Encoding=UTF-8
X-Desktop-File-Install-Version=0.2
Categories=System;Application;
+
diff --git a/main/mtr/mtr-res_mkquery.patch b/main/mtr/mtr-res_mkquery.patch
deleted file mode 100644
index c761e97e0e..0000000000
--- a/main/mtr/mtr-res_mkquery.patch
+++ /dev/null
@@ -1,374 +0,0 @@
---- a/mtr-0.80/configure
-+++ b/mtr-0.80/configure
-@@ -7165,317 +7165,6 @@
-
- # AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid))
-
--{ echo "$as_me:$LINENO: checking for res_mkquery" >&5
--echo $ECHO_N "checking for res_mkquery... $ECHO_C" >&6; }
--if test "${ac_cv_func_res_mkquery+set}" = set; then
-- echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-- cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--/* Define res_mkquery to an innocuous variant, in case <limits.h> declares res_mkquery.
-- For example, HP-UX 11i <limits.h> declares gettimeofday. */
--#define res_mkquery innocuous_res_mkquery
--
--/* System header to define __stub macros and hopefully few prototypes,
-- which can conflict with char res_mkquery (); below.
-- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-- <limits.h> exists even on freestanding compilers. */
--
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
--
--#undef res_mkquery
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char res_mkquery ();
--/* The GNU C library defines this for functions which it implements
-- to always fail with ENOSYS. Some functions are actually named
-- something starting with __ and the normal name is an alias. */
--#if defined __stub_res_mkquery || defined __stub___res_mkquery
--choke me
--#endif
--
--int
--main ()
--{
--return res_mkquery ();
-- ;
-- return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-- (eval "$ac_link") 2>conftest.er1
-- ac_status=$?
-- grep -v '^ *+' conftest.er1 >conftest.err
-- rm -f conftest.er1
-- cat conftest.err >&5
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && {
-- test -z "$ac_c_werror_flag" ||
-- test ! -s conftest.err
-- } && test -s conftest$ac_exeext &&
-- $as_test_x conftest$ac_exeext; then
-- ac_cv_func_res_mkquery=yes
--else
-- echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_cv_func_res_mkquery=no
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-- conftest$ac_exeext conftest.$ac_ext
--fi
--{ echo "$as_me:$LINENO: result: $ac_cv_func_res_mkquery" >&5
--echo "${ECHO_T}$ac_cv_func_res_mkquery" >&6; }
--if test $ac_cv_func_res_mkquery = yes; then
-- :
--else
--
--{ echo "$as_me:$LINENO: checking for res_mkquery in -lbind" >&5
--echo $ECHO_N "checking for res_mkquery in -lbind... $ECHO_C" >&6; }
--if test "${ac_cv_lib_bind_res_mkquery+set}" = set; then
-- echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lbind $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char res_mkquery ();
--int
--main ()
--{
--return res_mkquery ();
-- ;
-- return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-- (eval "$ac_link") 2>conftest.er1
-- ac_status=$?
-- grep -v '^ *+' conftest.er1 >conftest.err
-- rm -f conftest.er1
-- cat conftest.err >&5
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && {
-- test -z "$ac_c_werror_flag" ||
-- test ! -s conftest.err
-- } && test -s conftest$ac_exeext &&
-- $as_test_x conftest$ac_exeext; then
-- ac_cv_lib_bind_res_mkquery=yes
--else
-- echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_cv_lib_bind_res_mkquery=no
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_res_mkquery" >&5
--echo "${ECHO_T}$ac_cv_lib_bind_res_mkquery" >&6; }
--if test $ac_cv_lib_bind_res_mkquery = yes; then
-- cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBBIND 1
--_ACEOF
--
-- LIBS="-lbind $LIBS"
--
--else
--
--{ echo "$as_me:$LINENO: checking for res_mkquery in -lresolv" >&5
--echo $ECHO_N "checking for res_mkquery in -lresolv... $ECHO_C" >&6; }
--if test "${ac_cv_lib_resolv_res_mkquery+set}" = set; then
-- echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char res_mkquery ();
--int
--main ()
--{
--return res_mkquery ();
-- ;
-- return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-- (eval "$ac_link") 2>conftest.er1
-- ac_status=$?
-- grep -v '^ *+' conftest.er1 >conftest.err
-- rm -f conftest.er1
-- cat conftest.err >&5
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && {
-- test -z "$ac_c_werror_flag" ||
-- test ! -s conftest.err
-- } && test -s conftest$ac_exeext &&
-- $as_test_x conftest$ac_exeext; then
-- ac_cv_lib_resolv_res_mkquery=yes
--else
-- echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_cv_lib_resolv_res_mkquery=no
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_mkquery" >&5
--echo "${ECHO_T}$ac_cv_lib_resolv_res_mkquery" >&6; }
--if test $ac_cv_lib_resolv_res_mkquery = yes; then
-- cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
--_ACEOF
--
-- LIBS="-lresolv $LIBS"
--
--else
--
--{ echo "$as_me:$LINENO: checking for __res_mkquery in -lresolv" >&5
--echo $ECHO_N "checking for __res_mkquery in -lresolv... $ECHO_C" >&6; }
--if test "${ac_cv_lib_resolv___res_mkquery+set}" = set; then
-- echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char __res_mkquery ();
--int
--main ()
--{
--return __res_mkquery ();
-- ;
-- return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-- (eval "$ac_link") 2>conftest.er1
-- ac_status=$?
-- grep -v '^ *+' conftest.er1 >conftest.err
-- rm -f conftest.er1
-- cat conftest.err >&5
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && {
-- test -z "$ac_c_werror_flag" ||
-- test ! -s conftest.err
-- } && test -s conftest$ac_exeext &&
-- $as_test_x conftest$ac_exeext; then
-- ac_cv_lib_resolv___res_mkquery=yes
--else
-- echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_cv_lib_resolv___res_mkquery=no
--fi
--
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_mkquery" >&5
--echo "${ECHO_T}$ac_cv_lib_resolv___res_mkquery" >&6; }
--if test $ac_cv_lib_resolv___res_mkquery = yes; then
-- cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
--_ACEOF
--
-- LIBS="-lresolv $LIBS"
--
--else
-- { { echo "$as_me:$LINENO: error: No resolver library found" >&5
--echo "$as_me: error: No resolver library found" >&2;}
-- { (exit 1); exit 1; }; }
--fi
--
--fi
--
--fi
--
--fi
--
--# This next line would override the just detected-or-not -lresolv.
--# This apparently hurts BSD. And it's bad practise. So it should go.
--# However, it probably didn't get added for nothing..... Holler if
--# removing it hurts your OS.... -- REW
--#LIBS="$LIBS -lresolv"
--
- { echo "$as_me:$LINENO: checking for herror" >&5
- echo $ECHO_N "checking for herror... $ECHO_C" >&6; }
- if test "${ac_cv_func_herror+set}" = set; then
---- a/mtr-0.80/dns.c
-+++ b/mtr-0.80/dns.c
-@@ -881,6 +881,51 @@
- }
-
-
-+ /* res_mkquery from dietlibc libcruft http://www.fefe.de/dietlibc/ */
-+
-+static char dnspacket[]="\xfe\xfe\001\000\000\001\000\000\000\000\000\000";
-+
-+static int res_mkquery(int op, const char *dname, int class, int type, char* data,
-+ int datalen, const unsigned char* newrr, char* buf, int buflen) {
-+ unsigned char packet[512];
-+ unsigned long len;
-+
-+ memcpy(packet,dnspacket,12);
-+ len=rand();
-+ packet[0]=len;
-+ packet[1]=len>>8;
-+ len=0;
-+ if ((_res.options&RES_RECURSE)==0) packet[2]=0;
-+ {
-+ unsigned char* x;
-+ const char* y,* tmp;
-+ x=packet+12; y=dname;
-+ while (*y) {
-+ while (*y=='.') ++y;
-+ for (tmp=y; *tmp && *tmp!='.'; ++tmp) ;
-+ if (tmp-y > 63) return -1;
-+ *x=tmp-y;
-+ if (!(tmp-y)) break;
-+ if ((len+=*x+1) > 254) return -1;
-+ ++x;
-+ memmove(x,y,tmp-y);
-+ x+=tmp-y;
-+ if (!*tmp) {
-+ *x=0;
-+ break;
-+ }
-+ y=tmp;
-+ }
-+ *++x= 0; *++x= type; /* A */
-+ *++x= 0; *++x= class; /* IN */
-+ ++x;
-+ if (x-packet>buflen) return -1;
-+ memmove(buf,packet,x-packet);
-+ return x-packet;
-+ }
-+}
-+
-+
- void dorequest(char *s,int type,word id)
- {
- packetheader *hp;