提交 5d1d00fb 编写于 作者: S Stefano Babic 提交者: Wolfgang Denk

Add include for config.h in command.h.

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: NStefano Babic <sbabic@denx.de>
上级 2dacb734
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#ifndef __COMMAND_H #ifndef __COMMAND_H
#define __COMMAND_H #define __COMMAND_H
#include <config.h>
#ifndef NULL #ifndef NULL
#define NULL 0 #define NULL 0
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册