From owner-svn-ports-head@FreeBSD.ORG Mon Mar 2 10:50:15 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EF05941; Mon, 2 Mar 2015 10:50:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B004FAB; Mon, 2 Mar 2015 10:50:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22AoFGk084438; Mon, 2 Mar 2015 10:50:15 GMT (envelope-from kwm@FreeBSD.org) Received: (from kwm@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22AoFtc084437; Mon, 2 Mar 2015 10:50:15 GMT (envelope-from kwm@FreeBSD.org) Message-Id: <201503021050.t22AoFtc084437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kwm set sender to kwm@FreeBSD.org using -f From: Koop Mast Date: Mon, 2 Mar 2015 10:50:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r380247 - head/net/mrouted/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 10:50:15 -0000 Author: kwm Date: Mon Mar 2 10:50:14 2015 New Revision: 380247 URL: https://svnweb.freebsd.org/changeset/ports/380247 QAT: https://qat.redports.org/buildarchive/r380247/ Log: Fix the build with clang 3.5. PR: 196166 Submitted by: dim@ Approved by: maintainer (timeout 6 weeks) Added: head/net/mrouted/files/patch-mtrace.c (contents, props changed) Added: head/net/mrouted/files/patch-mtrace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/mrouted/files/patch-mtrace.c Mon Mar 2 10:50:14 2015 (r380247) @@ -0,0 +1,24 @@ +--- mtrace.c.orig 2011-10-23 10:03:36.000000000 +0200 ++++ mtrace.c 2014-12-20 20:31:14.000000000 +0100 +@@ -903,6 +903,12 @@ void stat_line(struct tr_resp *r, struct + } + } + ++static uint32_t ++udiff(uint32_t u, uint32_t v) ++{ ++ return (u >= v ? u - v : v - u); ++} ++ + /* + * A fixup to check if any pktcnt has been reset, and to fix the + * byteorder bugs in mrouted 3.6 on little-endian machines. +@@ -920,7 +926,7 @@ void fixup_stats(struct resp_buf *base, + /* Check for byte-swappers */ + while (--rno >= 0) { + --n; --p; --b; --s; +- if (*s || abs(ntohl(n->tr_vifout) - ntohl(p->tr_vifout)) > 100000) { ++ if (*s || udiff(ntohl(n->tr_vifout), ntohl(p->tr_vifout)) > 100000) { + /* This host sends byteswapped reports; swap 'em */ + if (!*s) { + *s = 1;