diff --git a/.gitmodules b/.gitmodules
index 5f85b18b6..771f79185 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "common/include/boost"]
path = common/include/boost
url = https://github.com/Atmosphere-NX/ext-boost.git
+[submodule "stratosphere/libstratosphere"]
+ path = stratosphere/libstratosphere
+ url = https://github.com/Atmosphere-NX/libstratosphere.git
diff --git a/common/include/atmosphere.h b/common/include/atmosphere.h
new file mode 100644
index 000000000..86f2f0427
--- /dev/null
+++ b/common/include/atmosphere.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Atmosphère-NX
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef ATMOSPHERE_H
+#define ATMOSPHERE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "atmosphere/version.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/stratosphere/boot/source/boot_main.cpp b/stratosphere/boot/source/boot_main.cpp
index 9eb94f170..1709654bf 100644
--- a/stratosphere/boot/source/boot_main.cpp
+++ b/stratosphere/boot/source/boot_main.cpp
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#define CAR_BASE 0x60006000
@@ -84,7 +85,7 @@ void __appInit(void) {
fsdevMountSdmc();
- CheckAtmosphereVersion();
+ CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);
}
void __appExit(void) {
diff --git a/stratosphere/fs_mitm/source/fsmitm_main.cpp b/stratosphere/fs_mitm/source/fsmitm_main.cpp
index 1c12d9db1..95f627d7a 100644
--- a/stratosphere/fs_mitm/source/fsmitm_main.cpp
+++ b/stratosphere/fs_mitm/source/fsmitm_main.cpp
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include "fsmitm_service.hpp"
@@ -65,7 +66,8 @@ void __appInit(void) {
if (R_FAILED(rc)) {
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS));
}
- CheckAtmosphereVersion();
+
+ CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);
}
void __appExit(void) {
diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere
new file mode 160000
index 000000000..3e8731809
--- /dev/null
+++ b/stratosphere/libstratosphere
@@ -0,0 +1 @@
+Subproject commit 3e873180905d411472722783162e6e4ee8158cfb
diff --git a/stratosphere/loader/source/ldr_main.cpp b/stratosphere/loader/source/ldr_main.cpp
index 8db791cd0..f4118afc7 100644
--- a/stratosphere/loader/source/ldr_main.cpp
+++ b/stratosphere/loader/source/ldr_main.cpp
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include "ldr_process_manager.hpp"
@@ -80,7 +81,7 @@ void __appInit(void) {
fatalSimple(0xCAFE << 4 | 2);
}
- CheckAtmosphereVersion();
+ CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);
}
void __appExit(void) {
diff --git a/stratosphere/pm/source/pm_main.cpp b/stratosphere/pm/source/pm_main.cpp
index 2e15f12c8..07f9fc2ec 100644
--- a/stratosphere/pm/source/pm_main.cpp
+++ b/stratosphere/pm/source/pm_main.cpp
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include "pm_boot_mode.hpp"
@@ -119,7 +120,7 @@ void __appInit(void) {
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS));
}
- CheckAtmosphereVersion();
+ CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);
}
void __appExit(void) {
diff --git a/stratosphere/set_mitm/source/setmitm_main.cpp b/stratosphere/set_mitm/source/setmitm_main.cpp
index c03f5099d..0a7b0a295 100644
--- a/stratosphere/set_mitm/source/setmitm_main.cpp
+++ b/stratosphere/set_mitm/source/setmitm_main.cpp
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include "setsys_mitm_service.hpp"
@@ -64,7 +65,7 @@ void __appInit(void) {
fatalSimple(rc);
}
- CheckAtmosphereVersion();
+ CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);
}
void __appExit(void) {