>Number: 31330
>Category: bin
>Synopsis: cross-build requires host to have PRId64 define
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 17 06:52:00 +0000 2005
>Originator: Wim Lewis
>Release: CVS head 14-September-2005
>Organization:
HHHH
>Environment:
OpenBSD underhill.hhhh.org 3.7 UNDERHILL#0 i386
>Description:
The 'fdisk' tool requires the PRId64 format macro; if the host system doesn't have that, the cross-compile fails.
>How-To-Repeat:
Build netbsd on a host system with a not terribly up-to-date C compiler, such as OpenBSD 3.7.
>Fix:
Trivial workaround is to add a definition in tools/compat/compat_defs.h :
#ifndef PRId64
#define PRId64 "%ld"
#endif
but it would probably be better to snarf one of the public-domain inttypes implementations (which use a pile of CPP tests to guess what each PRIxxx string should be) and use it in the cross environment if needed.