Subject: bin/31330: cross-build requires host to have PRId64 define
To: None <,>
From: None <>
List: netbsd-bugs
Date: 09/17/2005 06:52:01
>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
OpenBSD 3.7 UNDERHILL#0 i386

The 'fdisk' tool requires the PRId64 format macro; if the host system doesn't have that, the cross-compile fails.
Build netbsd on a host system with a not terribly up-to-date C compiler, such as OpenBSD 3.7.

Trivial workaround is to add a definition in tools/compat/compat_defs.h :

#ifndef PRId64
#define PRId64 "%ld"

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.