@@ -8,7 +8,7 @@
#define EXPORT_FUNC(a, b, c, ...)
#endif
EXPORT_FUNC(get_version, unsigned long, get_version, void)
- EXPORT_FUNC(getc, int, getc, void)
+ EXPORT_FUNC(getc, int, _u_boot_getc, void)
EXPORT_FUNC(tstc, int, tstc, void)
EXPORT_FUNC(putc, void, putc, const char)
EXPORT_FUNC(puts, void, puts, const char *)
@@ -20,7 +20,7 @@ void jumptable_init(void);
/* These are declarations of exported functions available in C code */
unsigned long get_version(void);
-int getc(void);
+int _u_boot_getc(void);
int tstc(void);
void putc(const char);
void puts(const char*);
@@ -4,6 +4,8 @@
#include <stdarg.h>
#include <linux/compiler.h>
+#define getc _u_boot_getc
+
/* stdin */
int getc(void);
int tstc(void);
The sandbox is built with the SDL2 library with invokes the X11 library which in turn calls getc(). But getc() in glibc is defined as int getc(FILE *) This does not match our definition. int getc(void) The sandbox crashes when called with parameter -l. Rename our library symbol to be called _u_boot_getc(). To keep the coding changes minimal use a define. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- include/_exports.h | 2 +- include/exports.h | 2 +- include/stdio.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) -- 2.28.0