[PATCH/committed,3/4] sim: common: include sim-types.h in the endian header directly

Message ID 20240103071928.26550-3-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,1/4] sim: ppc: sync WITH_TARGET_{ADDRESS, CELL}_BITSIZE with common/ |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged

Commit Message

Mike Frysinger Jan. 3, 2024, 7:19 a.m. UTC
  This is a bit redundant for most ports as they go through sim-basics.h
which always includes sim-types.h before including sim-endian.h, but in
order to unify ppc's sim-endian code, we need this include here.  Plus,
it's the directly we generally want to go to get away from one header
that defines all APIs and causes hard to untangle dependencies.
---
 sim/common/sim-endian.h | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/sim/common/sim-endian.h b/sim/common/sim-endian.h
index 589169ea11cf..93a6d0d8c13a 100644
--- a/sim/common/sim-endian.h
+++ b/sim/common/sim-endian.h
@@ -23,6 +23,8 @@ 
 #ifndef SIM_ENDIAN_H
 #define SIM_ENDIAN_H
 
+#include "sim-types.h"
+
 /* C byte conversion functions */
 
 INLINE_SIM_ENDIAN(unsigned_1) endian_h2t_1(unsigned_1 x);