Skip to content

Commit d9652c5

Browse files
committed
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.
1 parent 6e9324e commit d9652c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sim_ether.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,15 @@ extern const ETH_MAC eth_mac_bcast;
414414
* and memcpy will copy from somewhere other than the first byte of the source MAC
415415
* address.
416416
*/
417-
static inline void eth_copy_mac(ETH_MAC dst, const ETH_MAC src)
417+
static SIM_INLINE void eth_copy_mac(ETH_MAC dst, const ETH_MAC src)
418418
{
419419
memcpy(dst, src, sizeof(ETH_MAC));
420420
}
421421

422422
/* Type-enforcing MAC comparison function. Helps to avoid subtle memcmp() issues
423423
* (see above).
424424
*/
425-
static inline int eth_mac_cmp(const ETH_MAC a, const ETH_MAC b)
425+
static SIM_INLINE int eth_mac_cmp(const ETH_MAC a, const ETH_MAC b)
426426
{
427427
return memcmp(a, b, sizeof(ETH_MAC));
428428
}

0 commit comments

Comments
 (0)