From patchwork Wed Jan 16 04:41:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot] Function prototype conflicts with standalone apps From: Chris Packham X-Patchwork-Id: 212388 Message-Id: To: u-boot Date: Wed, 16 Jan 2013 17:41:41 +1300 Here is a patch for the latter option ---8<--- >From ece309850996e2347c54a9874dee5cc67e673402 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 16 Jan 2013 17:36:05 +1300 Subject: [PATCH] exports.h: add required definitions from common.h To avoid symbol namespace conflicts between standalone applications and u-boot code add the definitions required in exports.h so standalone applications do not have to include common.h. --- examples/standalone/hello_world.c | 1 - include/exports.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/standalone/hello_world.c b/examples/standalone/hello_world.c index 067c390..91a2deb 100644 --- a/examples/standalone/hello_world.c +++ b/examples/standalone/hello_world.c @@ -21,7 +21,6 @@ * MA 02111-1307 USA */ -#include #include int hello_world (int argc, char * const argv[]) diff --git a/include/exports.h b/include/exports.h index 63aa4b2..65b25a1 100644 --- a/include/exports.h +++ b/include/exports.h @@ -3,6 +3,21 @@ #ifndef __ASSEMBLY__ +#ifndef __COMMON_H_ +typedef unsigned char uchar; +typedef volatile unsigned long vu_long; +typedef volatile unsigned short vu_short; +typedef volatile unsigned char vu_char; + +#include +#include +#include +#include +#include +#include +#include +#endif /* ifndef __COMMON_H__ */ + /* These are declarations of exported functions available in C code */ unsigned long get_version(void); int getc(void);