From d9652c5c30d3c70bb1eab89b5708ced002e639fb Mon Sep 17 00:00:00 2001 From: Christian Gauger-Cosgrove Date: Thu, 2 Oct 2025 16:49:12 -0400 Subject: [PATCH] SIM_ETHER: restore ability to compile on Visual Studio 2013 and below Replaced the naked `inline` specifier with the SIM_INLINE macro call, allowing for pre-ANSI C99 compilers to continue compiling SIMH, as the `inline` keyword is unsupported in ANSI C89/ISO C90. --- sim_ether.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim_ether.h b/sim_ether.h index 9cca60a3f..1ebb7bdc2 100644 --- a/sim_ether.h +++ b/sim_ether.h @@ -414,7 +414,7 @@ extern const ETH_MAC eth_mac_bcast; * and memcpy will copy from somewhere other than the first byte of the source MAC * address. */ -static inline void eth_copy_mac(ETH_MAC dst, const ETH_MAC src) +static SIM_INLINE void eth_copy_mac(ETH_MAC dst, const ETH_MAC src) { memcpy(dst, src, sizeof(ETH_MAC)); } @@ -422,7 +422,7 @@ static inline void eth_copy_mac(ETH_MAC dst, const ETH_MAC src) /* Type-enforcing MAC comparison function. Helps to avoid subtle memcmp() issues * (see above). */ -static inline int eth_mac_cmp(const ETH_MAC a, const ETH_MAC b) +static SIM_INLINE int eth_mac_cmp(const ETH_MAC a, const ETH_MAC b) { return memcmp(a, b, sizeof(ETH_MAC)); }