On Sat, Jul 23, 2016 at 2:30 PM, Hisashi T Fujinaka <htodd at twofifty.com> wrote: [...]>> Could you try commenting out the HAVE_REALLOCARRAY line in config.h >> make clean, make and rerun the test? > > That works. Weird how I need that on -current but not on -7.Looks like reallocarray was added after 7: it's in http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-current but it's not in http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-7.0.1. Maybe there's a bug in it? I note that the man page says the prototype needs "_OPENBSD_SOURCE", maybe the lack of prototype gets the return truncated to int? maybe try ./configure --with-cflags=-D_OPENBSD_SOURCE ? -- Darren Tucker (dtucker at zip.com.au) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Sat, 23 Jul 2016, Darren Tucker wrote:> [...] > >> Could you try commenting out the HAVE_REALLOCARRAY line in config.h > >> make clean, make and rerun the test? > > > > That works. Weird how I need that on -current but not on -7. > > Looks like reallocarray was added after 7: it's in > http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-current but > it's not in http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-7.0.1. > Maybe there's a bug in it? I note that the man page says the > prototype needs "_OPENBSD_SOURCE", maybe the lack of prototype gets > the return truncated to int? maybe try ./configure > --with-cflags=-D_OPENBSD_SOURCE ?This is probably the problem - the weird pointer I noted in Fujinaka-san's gdb output was probably a sign-extended integer. Could you try this patch? You'll need to make clean, run autoreconf and configure again. -d diff --git a/configure.ac b/configure.ac index e64386f..373d21b 100644 --- a/configure.ac +++ b/configure.ac @@ -839,6 +839,7 @@ mips-sony-bsd|mips-sony-newsos4) if test "x$withval" != "xno" ; then need_dash_r=1 fi + CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE" AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way]) AC_CHECK_HEADER([net/if_tap.h], , AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
On Wed, 27 Jul 2016, Damien Miller wrote:> On Sat, 23 Jul 2016, Darren Tucker wrote: > >> [...] >>>> Could you try commenting out the HAVE_REALLOCARRAY line in config.h >>>> make clean, make and rerun the test? >>> >>> That works. Weird how I need that on -current but not on -7. >> >> Looks like reallocarray was added after 7: it's in >> http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-current but >> it's not in http://netbsd.gw.com/cgi-bin/man-cgi?reallocarray++NetBSD-7.0.1. >> Maybe there's a bug in it? I note that the man page says the >> prototype needs "_OPENBSD_SOURCE", maybe the lack of prototype gets >> the return truncated to int? maybe try ./configure >> --with-cflags=-D_OPENBSD_SOURCE ? > > This is probably the problem - the weird pointer I noted in > Fujinaka-san's gdb output was probably a sign-extended integer. > > Could you try this patch? You'll need to make clean, run autoreconf > and configure again. > > -d > > diff --git a/configure.ac b/configure.ac > index e64386f..373d21b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -839,6 +839,7 @@ mips-sony-bsd|mips-sony-newsos4) > if test "x$withval" != "xno" ; then > need_dash_r=1 > fi > + CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE" > AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way]) > AC_CHECK_HEADER([net/if_tap.h], , > AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))This works. Thanks! -- Hisashi T Fujinaka - htodd at twofifty.com BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee