Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

[frontend] fix Simpleini warnings SI_NO_CONVERSION macro being redefined when provided by cmdline (freebsd, linux, etc) (#2877)

lizzieeffe8109a76e
diff --git a/src/frontend_common/config.h b/src/frontend_common/config.h
index 8b0599cc33..ff816443ad 100644
--- a/src/frontend_common/config.h
+++ b/src/frontend_common/config.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -7,7 +10,12 @@
#include <string>
#include "common/settings.h"
-#define SI_NO_CONVERSION
+// May be defined on command line by system provided packages (FreeBSD devel/simpleini)
+// but if building from source, it will not be defined, so just do it conditionally.
+// Should probably define on CMake anyways but eh
+#ifndef SI_NO_CONVERSION
+# define SI_NO_CONVERSION 1
+#endif
#include <SimpleIni.h>
#include <boost/algorithm/string/replace.hpp>