Bug 178862

Summary: [tools] [patch] fix cross-compilation (amd64/i386) of netrate/netreceive
Product: Base System Reporter: olivier
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

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