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 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-23 15:40 UTC by olivier
Modified: 2018-01-03 05:14 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