[PATCH 2/2] ubi-tests/integ: Add PRIxxx_t defines.

Bill Pringlemeir bpringle at sympatico.ca
Mon Nov 5 13:04:33 EST 2012

Message-ID: <87ehk7nc1l.fsf at 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 <bpringlemeir at nbsps.com>
 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 <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
+#include <inttypes.h>
 #include <string.h>
 #include <errno.h>
@@ -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
+#define PRIxoff_t "l"PRIx32
+#define PRIdoff_t "l"PRId32
 struct erase_block_info;
 struct volume_info;
 struct ubi_device_info;

More information about the linux-mtd mailing list