[PATCH 03/10] HV: add #ifdef for include header file #ifdef


YanLiang
 

From: Chaohong guo <chaohong.guo@...>

e820.h file has no ifdef protection for repeated/recursive inclusion.
Just add that.

Signed-off-by: Chaohong guo <chaohong.guo@...>
---
hypervisor/include/arch/x86/e820.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/hypervisor/include/arch/x86/e820.h b/hypervisor/include/arch/x86/e820.h
index d932a2ef..8acb9a0d 100644
--- a/hypervisor/include/arch/x86/e820.h
+++ b/hypervisor/include/arch/x86/e820.h
@@ -4,6 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

+#ifndef _E820_H_
+#define _E820_H_
struct e820_mem_params {
uint64_t mem_bottom;
uint64_t mem_top;
@@ -43,3 +45,5 @@ const struct e820_mem_params *get_e820_mem_info(void);
#define NUM_E820_ENTRIES 5U
extern const struct e820_entry e820_default_entries[NUM_E820_ENTRIES];
#endif
+
+#endif /* _E820_H_ */
--
2.19.0

Join {acrn-dev@lists.projectacrn.org to automatically receive all group messages.