From bb636dc05ad27192d4efa6bec461243f10f646ba Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 2 Jun 2018 23:42:01 -0600 Subject: [PATCH] SM: Make Mitm compile-time toggleable, to forestall whining. --- stratosphere/sm/Makefile | 2 +- stratosphere/sm/source/sm_user_service.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stratosphere/sm/Makefile b/stratosphere/sm/Makefile index c819c77fd..dd7eb33ad 100644 --- a/stratosphere/sm/Makefile +++ b/stratosphere/sm/Makefile @@ -34,7 +34,7 @@ ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE CFLAGS := -g -Wall -O2 -ffunction-sections \ $(ARCH) $(DEFINES) -CFLAGS += $(INCLUDE) -D__SWITCH__ -DSM_ENABLE_SMHAX +CFLAGS += $(INCLUDE) -D__SWITCH__ -DSM_ENABLE_SMHAX -DSM_ENABLE_MITM CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17 diff --git a/stratosphere/sm/source/sm_user_service.cpp b/stratosphere/sm/source/sm_user_service.cpp index a5c36ce6d..4c1bce24a 100644 --- a/stratosphere/sm/source/sm_user_service.cpp +++ b/stratosphere/sm/source/sm_user_service.cpp @@ -18,12 +18,14 @@ Result UserService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, case User_Cmd_UnregisterService: rc = WrapIpcCommandImpl<&UserService::unregister_service>(this, r, out_c, pointer_buffer, pointer_buffer_size); break; +#ifdef SM_ENABLE_MITM case User_Cmd_AtmosphereInstallMitm: rc = WrapIpcCommandImpl<&UserService::install_mitm>(this, r, out_c, pointer_buffer, pointer_buffer_size); break; case User_Cmd_AtmosphereUninstallMitm: rc = WrapIpcCommandImpl<&UserService::uninstall_mitm>(this, r, out_c, pointer_buffer, pointer_buffer_size); break; +#endif default: break; }