diff --git a/griffin/griffin.c b/griffin/griffin.c
index 639ce86bb3..dc0f2784ef 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -750,11 +750,6 @@ MESSAGE
============================================================ */
#include "../libretro-common/queues/message_queue.c"
-/*============================================================
-PATCH
-============================================================ */
-#include "../patch.c"
-
/*============================================================
CONFIGURATION
============================================================ */
diff --git a/patch.c b/patch.c
index 8aec0af652..ca299d7385 100644
--- a/patch.c
+++ b/patch.c
@@ -585,7 +585,7 @@ static bool try_ips_patch(bool allow_ips,
* Apply patch to the content file in-memory.
*
**/
-void patch_content(
+static void patch_content(
const char *name_ips,
const char *name_bps,
const char *name_ups,
diff --git a/patch.h b/patch.h
deleted file mode 100644
index e3f2f83801..0000000000
--- a/patch.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* RetroArch - A frontend for libretro.
- * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
- * Copyright (C) 2011-2016 - Daniel De Matteis
- *
- * RetroArch is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Found-
- * ation, either version 3 of the License, or (at your option) any later version.
- *
- * RetroArch is distributed in the hope that 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 RetroArch.
- * If not, see .
- */
-
-#ifndef __PATCH_H
-#define __PATCH_H
-
-#include
-#include
-
-#include
-
-RETRO_BEGIN_DECLS
-
-/* BPS/UPS/IPS implementation from bSNES (nall::).
- * Modified for RetroArch. */
-
-
-/**
- * patch_content:
- * @buf : buffer of the content file.
- * @size : size of the content file.
- *
- * Apply patch to the content file in-memory.
- *
- **/
-void patch_content(
- const char *name_ips,
- const char *name_bps,
- const char *name_ups,
- uint8_t **buf,
- void *data);
-
-RETRO_END_DECLS
-
-#endif
diff --git a/tasks/task_content.c b/tasks/task_content.c
index da9be7829c..82636e1a86 100644
--- a/tasks/task_content.c
+++ b/tasks/task_content.c
@@ -85,7 +85,6 @@
#include "../msg_hash.h"
#include "../content.h"
#include "../dynamic.h"
-#include "../patch.h"
#include "../runloop.h"
#include "../retroarch.h"
#include "../file_path_special.h"
@@ -94,6 +93,8 @@
#include "../paths.h"
#include "../verbosity.h"
+#include "../patch.c"
+
#define MAX_ARGS 32
typedef struct content_stream
@@ -342,7 +343,8 @@ static bool load_content_into_memory(
global->name.ips,
global->name.bps,
global->name.ups,
- &ret_buf, length);
+ (uint8_t**)&ret_buf,
+ (void*)length);
}
content_get_crc(&content_crc_ptr);