[PATCH] Fix sandbox ./barebox --help by reverting 6b082cfe (fix printf warnings)

Peter Korsgaard jacmet at sunsite.dk
Sat May 14 17:29:04 EDT 2011

While getting rid of all the format(barebox_printf) warnings was nice,
it caused the printf calls in arch/sandbox/os/common.c to get directed
to the barebox versions rather than the libc ones causing a crash:

E.G. before this revert:
nm -a barebox|grep -w printf
0000000000404fa3 T print

And after:
nm -a barebox|grep -w printf
U printf@@GLIBC_2.2.5

Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
 include/stdio.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index 9b1f161..c824764 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -8,9 +8,6 @@
  * STDIO based functions (can always be used)
-#define ORIG_printf	printf
-#undef printf
 /* serial stuff */
 void	serial_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
@@ -63,6 +60,4 @@ int	fputc(int file, const char c);
 int	ftstc(int file);
 int	fgetc(int file);
-#define printf			ORIG_printf
 #endif /* __STDIO_H */

More information about the barebox mailing list