FreeBSD Bugzilla – Attachment 150819 Details for
Bug 196166
Fix net/mrouted build with clang 3.5.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix net/mrouted build with clang 3.5.0
net__mrouted-fix-clang350-build-1.diff (text/plain), 1.34 KB, created by
Dimitry Andric
on 2014-12-20 19:37:30 UTC
(
hide
)
Description:
Fix net/mrouted build with clang 3.5.0
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2014-12-20 19:37:30 UTC
Size:
1.34 KB
patch
obsolete
>Index: net/mrouted/files/patch-mtrace.c >=================================================================== >--- net/mrouted/files/patch-mtrace.c (revision 0) >+++ net/mrouted/files/patch-mtrace.c (working copy) >@@ -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; > >Property changes on: net/mrouted/files/patch-mtrace.c >___________________________________________________________________ >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196166
: 150819