diff --git a/GNUmakefile b/GNUmakefile
index 9525a2d57..b4f3202f7 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -258,6 +258,7 @@ engine_objs := \
miniz_tdef.c \
fix16.cpp \
fix16_str.cpp \
+ sjson.cpp \
engine_editor_objs := \
build.cpp \
diff --git a/platform/Windows/build.vcxproj b/platform/Windows/build.vcxproj
index 55209e246..570b91eac 100644
--- a/platform/Windows/build.vcxproj
+++ b/platform/Windows/build.vcxproj
@@ -275,6 +275,7 @@
true
true
+
diff --git a/platform/Windows/build.vcxproj.filters b/platform/Windows/build.vcxproj.filters
index ea149cbd9..fe013409f 100644
--- a/platform/Windows/build.vcxproj.filters
+++ b/platform/Windows/build.vcxproj.filters
@@ -146,6 +146,9 @@
Source Files
+
+ Source Files
+
Source Files
diff --git a/platform/Windows/msvc.mak b/platform/Windows/msvc.mak
index 4d4b37ce9..2a86b8925 100644
--- a/platform/Windows/msvc.mak
+++ b/platform/Windows/msvc.mak
@@ -192,7 +192,8 @@ ENGINE_OBJS= \
$(ENGINE_OBJ)\miniz_tinfl.$o \
$(ENGINE_OBJ)\miniz_tdef.$o \
$(ENGINE_OBJ)\fix16.$o \
- $(ENGINE_OBJ)\fix16_str.$o
+ $(ENGINE_OBJ)\fix16_str.$o \
+ $(ENGINE_OBJ)\sjson.$o \
ENGINE_EDITOR_OBJS=$(ENGINE_OBJ)\build.$o \
diff --git a/source/build/src/sjson.cpp b/source/build/src/sjson.cpp
new file mode 100644
index 000000000..aee8cce40
--- /dev/null
+++ b/source/build/src/sjson.cpp
@@ -0,0 +1,5 @@
+
+#include "compat.h"
+
+#define SJSON_IMPLEMENT
+#include "sjson.h"
diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp
index 56139a67b..4532aa5b4 100644
--- a/source/duke3d/src/player.cpp
+++ b/source/duke3d/src/player.cpp
@@ -5657,7 +5657,6 @@ HORIZONLY:;
}
-#define SJSON_IMPLEMENT
#include "sjson.h"
int portableBackupSave(const char * path, const char * name, int volume, int level)
diff --git a/source/thirdparty/include/sjson.h b/source/thirdparty/include/sjson.h
index 65aec68b1..e99b1167a 100644
--- a/source/thirdparty/include/sjson.h
+++ b/source/thirdparty/include/sjson.h
@@ -324,9 +324,9 @@ bool sjson_check(const sjson_node* node, char errmsg[256]);
#ifndef sjson_malloc
# include
# include
-# define sjson_malloc(user, size) (UNREFERENCED_PARAMETER(user), malloc(size))
-# define sjson_free(user, ptr) (UNREFERENCED_PARAMETER(user), free(ptr))
-# define sjson_realloc(user, ptr, size) (UNREFERENCED_PARAMETER(user), realloc(ptr, size))
+# define sjson_malloc(user, size) ((UNREFERENCED_PARAMETER(user)), malloc(size))
+# define sjson_free(user, ptr) ((UNREFERENCED_PARAMETER(user)), free(ptr))
+# define sjson_realloc(user, ptr, size) ((UNREFERENCED_PARAMETER(user)), realloc(ptr, size))
#endif
#ifndef sjson_assert