From patchwork Mon Nov 5 18:04:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] ubi-tests/integ: Add PRIxxx_t defines. Date: Mon, 05 Nov 2012 08:04:33 -0000 From: Bill Pringlemeir X-Patchwork-Id: 197266 Message-Id: To: linux-mtd@lists.infradead.org Message-ID: <87ehk7nc1l.fsf@sympatico.ca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --text follows this line-- I doubt this is the 'correct' solution, but it does show the issue. common.h is shadowed by local copy of the same name. Also include inttype.h in case the c library does not. Signed-off-by: Bill Pringlemeir --- tests/ubi-tests/integ.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/ubi-tests/integ.c b/tests/ubi-tests/integ.c index e48f533..9b1347f 100644 --- a/tests/ubi-tests/integ.c +++ b/tests/ubi-tests/integ.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -16,6 +17,17 @@ #include "libubi.h" #include "common.h" +/* Duplicate: of common.h in top 'include'. */ +/* Define a print format specifier for off_t */ +#ifdef __USE_FILE_OFFSET64 +#define PRIxoff_t PRIx64 +#define PRIdoff_t PRId64 +#else +#define PRIxoff_t "l"PRIx32 +#define PRIdoff_t "l"PRId32 +#endif + + struct erase_block_info; struct volume_info; struct ubi_device_info;