fw_cfg: add required header files
authorHu Tao <hutao@cn.fujitsu.com>
Fri, 26 Apr 2013 03:24:43 +0000 (11:24 +0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 30 Apr 2013 15:30:01 +0000 (10:30 -0500)
If fw_cfg.h is included alone, gcc gives error messages like these:

  error: unknown type name ‘uint32_t’
  error: unknown type name ‘size_t’
  error: unknown type name ‘hwaddr’
  ...

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: d63f8bcdbfbec8135b1b57f9247c513a3e25762c.1366945969.git.hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
include/hw/nvram/fw_cfg.h

index 05c8df1..3e4a334 100644 (file)
@@ -1,6 +1,13 @@
 #ifndef FW_CFG_H
 #define FW_CFG_H
 
+#ifndef NO_QEMU_PROTOS
+#include <stdint.h>
+#include <stddef.h>
+
+#include "exec/hwaddr.h"
+#endif
+
 #define FW_CFG_SIGNATURE        0x00
 #define FW_CFG_ID               0x01
 #define FW_CFG_UUID             0x02