From owner-freebsd-ports@FreeBSD.ORG Fri Jun 11 15:18:38 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CADA216A4CE for ; Fri, 11 Jun 2004 15:18:38 +0000 (GMT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 815FF43D69 for ; Fri, 11 Jun 2004 15:18:37 +0000 (GMT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i5BFDA67023420 for ; Fri, 11 Jun 2004 17:13:10 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <026a01c44fc6$9fe59a40$471b3dd4@dual> From: "Willem Jan Withagen" To: Date: Fri, 11 Jun 2004 17:13:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Running net-snmp on amd64 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2004 15:18:38 -0000 Hi, I't trying to get net-snmp running on my system, but snmpd crashes in this snippet of code: mibII/ipv6.c const char *tcblist = "net.inet.tcp.pcblist"; int len; if (sysctlbyname(tcblist, 0, &len, 0, 0) < 0) return NULL; if ((sysctl_buf = malloc(len)) == NULL) return NULL; if (sysctlbyname(tcblist, sysctl_buf, &len, 0, 0) < 0) { free(sysctl_buf); return NULL; } The definition in sys/sysctl.h is: int sysctlbyname(const char *, void *, size_t *, void *, size_t); So how is it possible that after the return on the first sysctlbyname call tcblist contains 0x200000000, instead of the text pointer.... Compiled with: cc -I../../include -I../../include -I. -I../.. -I. -I./../.. -I./../../snmplib - I./.. -I.. -DAPPLLIB_EXP=/usr/local/lib/perl5/5.8.2/BSDPAN -DHAS_FPSETMASK -DHAS _FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include -I/usr/local/lib/perl 5/5.8.2/mach/CORE -DINET6 -pipe -g -Dfreebsd5 -c mibII/ipv6.c -fPIC -DPIC -o mibII/.libs/ipv6.lo Is this a compiler error, or need I look elsewhere?? Thanx, --WjW