From 8f072898443897a7496e4d1d4f0ae10557864dfc Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 23 Aug 2023 19:14:08 -0400 Subject: [PATCH] Make plat_fallthrough and plat_unused headers less fragile --- src/include/86box/plat_fallthrough.h | 2 ++ src/include/86box/plat_unused.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/include/86box/plat_fallthrough.h b/src/include/86box/plat_fallthrough.h index aadd4e14d..6165b266c 100644 --- a/src/include/86box/plat_fallthrough.h +++ b/src/include/86box/plat_fallthrough.h @@ -18,6 +18,7 @@ #ifndef EMU_PLAT_FALLTHROUGH_H #define EMU_PLAT_FALLTHROUGH_H +#ifndef EMU_PLAT_H #ifdef _MSC_VER # define fallthrough do {} while (0) /* fallthrough */ #else @@ -30,5 +31,6 @@ # define fallthrough do {} while (0) /* fallthrough */ # endif #endif +#endif #endif /*EMU_PLAT_FALLTHROUGH_H*/ diff --git a/src/include/86box/plat_unused.h b/src/include/86box/plat_unused.h index 73eaebaae..226cf677d 100644 --- a/src/include/86box/plat_unused.h +++ b/src/include/86box/plat_unused.h @@ -21,11 +21,13 @@ #ifndef EMU_PLAT_UNUSED_H #define EMU_PLAT_UNUSED_H +#ifndef EMU_PLAT_H #ifdef _MSC_VER # define UNUSED(arg) arg #else /* A hack (GCC-specific?) to allow us to ignore unused parameters. */ # define UNUSED(arg) __attribute__((unused)) arg #endif +#endif #endif /*EMU_PLAT_UNUSED_H*/