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 <hu...@cn.fujitsu.com>
---
 include/hw/nvram/fw_cfg.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 05c8df1..3e4a334 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -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
-- 
1.8.1.4


Reply via email to