]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Add include for config.h in command.h.
authorStefano Babic <sbabic@denx.de>
Fri, 25 Jul 2008 06:57:40 +0000 (08:57 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 29 Jul 2008 22:45:42 +0000 (00:45 +0200)
Because the cmd_tbl_s structure depends on the configuration file, it
must be assured that config.h is included before the structure is
evaluated by the compiler. If this is not certain, it could happen
that the compiler generates structures of different size, depending
on the fact if the source file includes <config.h> before or after
<command.h>.

The effect is that u-boot crashes when tries to relocate the command
table (for ppc) or try to access to the command table for other
architectures.

The problem can happen on board-depending commands. All general
commands under /common are unaffected, because they include already
config.h before command.h.

Signed-off-by: Stefano Babic <sbabic@denx.de>
include/command.h

index c3ef51d8c48250a6806606f051c48aa67635448e..4a27e9724768c8b5cf916684e9bf01770f32256d 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __COMMAND_H
 #define __COMMAND_H
 
+#include <config.h>
+
 #ifndef NULL
 #define NULL   0
 #endif