Bug 178862 - [tools] [patch] fix cross-compilation (amd64/i386) of netrate/netreceive
Summary: [tools] [patch] fix cross-compilation (amd64/i386) of netrate/netreceive
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-05-23 15:40 UTC by olivier
Modified: 2022-10-17 12:37 UTC (History)
0 users

See Also:


Attachments
file.diff (1004 bytes, patch)
2013-05-23 15:40 UTC, olivier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2013-05-23 15:40:00 UTC
Trying to compile src/tools/tools/netrate/netrceive on amd64 -current works great for compiling amd64 version. But when I tried to compile with target_arch=i386, I've got "netreceive.c:166:42: error: format specifies type 'long' but the argument has type 'time_t' (aka 'int') [-Werror,-Wformat]" here:

fprintf(stderr, "start at %ld.%09ld\n", then.tv_sec, then.tv_nsec);

With the help of cognet@, here is a patch.

Fix: Applying the patch

Patch attached with submission follows:
How-To-Repeat: From a -current amd64, start this compilation:

env TARGET=i386 TARGET_ARCH=i386 MACHINE=i386 OSVERSION=901000 UNAME_r=9.1-RELEASE-p1 UNAME_v=9.1-RELEASE-p1 UNAME_p=i386 UNAME_m=i386 make -C /usr/src/tools/tools/netrate/netreceive
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:10 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:37:12 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>