--- /dev/null
+--- xbmc-17.6-Krypton/xbmc/cores/DllLoader/exports/wrapper.c_orig 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/DllLoader/exports/wrapper.c 2018-11-05 20:10:21.780708420 +0100
+@@ -1,21 +1,9 @@
+ /*
+- * Copyright (C) 2005-2013 Team XBMC
+- * http://xbmc.org
+- *
+- * This Program 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 Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This Program 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 XBMC; see the file COPYING. If not, see
+- * <http://www.gnu.org/licenses/>.
++ * Copyright (C) 2005-2018 Team Kodi
++ * This file is part of Kodi - https://kodi.tv
+ *
++ * SPDX-License-Identifier: GPL-2.0-or-later
++ * See LICENSES/README.md for more information.
+ */
+
+ //
+@@ -45,9 +33,6 @@
+ typedef off64_t __off64_t;
+ typedef fpos_t fpos64_t;
+ #define stat64 stat
+-#if defined(TARGET_DARWIN) || defined(TARGET_ANDROID)
+-#define _G_va_list va_list
+-#endif
+ #endif
+
+ #ifdef TARGET_POSIX
+@@ -117,11 +102,7 @@
+
+ void *__wrap_dlopen(const char *filename, int flag)
+ {
+-#if defined(TARGET_ANDROID)
+- return dll_dlopen(filename, flag);
+-#else
+ return dlopen(filename, flag);
+-#endif
+ }
+
+ FILE *__wrap_popen(const char *command, const char *mode)
+@@ -174,14 +155,14 @@
+ return dll_read(fd, buf, count);
+ }
+
+-__off_t __wrap_lseek(int fildes, __off_t offset, int whence)
++__off_t __wrap_lseek(int filedes, __off_t offset, int whence)
+ {
+- return dll_lseek(fildes, offset, whence);
++ return dll_lseek(filedes, offset, whence);
+ }
+
+-__off64_t __wrap_lseek64(int fildes, __off64_t offset, int whence)
++__off64_t __wrap_lseek64(int filedes, __off64_t offset, int whence)
+ {
+- __off64_t seekRes = dll_lseeki64(fildes, offset, whence);
++ __off64_t seekRes = dll_lseeki64(filedes, offset, whence);
+ return seekRes;
+ }
+
+@@ -220,9 +201,9 @@
+ return dll_fopen(path, mode);
+ }
+
+-FILE *__wrap_fdopen(int fildes, const char *mode)
++FILE *__wrap_fdopen(int filedes, const char *mode)
+ {
+- return dll_fdopen(fildes, mode);
++ return dll_fdopen(filedes, mode);
+ }
+
+ FILE *__wrap_freopen(const char *path, const char *mode, FILE *stream)
+@@ -398,7 +379,7 @@
+ res = dll_ioctl(d, request, va);
+ va_end(va);
+ return res;
+-}
++}
+
+ int __wrap__stat(const char *path, struct _stat *buffer)
+ {
+@@ -468,10 +449,10 @@
+ return NULL;
+ }
+
+-// GCC 4.3 in Ubuntu 8.10 defines _FORTIFY_SOURCE=2 which means, that fread, read etc
++// GCC 4.3 in Ubuntu 8.10 defines _FORTIFY_SOURCE=2 which means, that fread, read etc
+ // are actually #defines which are inlined when compiled with -O. Those defines
+-// actally call __*chk (for example, __fread_chk). We need to bypass this whole
+-// thing to actually call our wrapped functions.
++// actually call __*chk (for example, __fread_chk). We need to bypass this whole
++// thing to actually call our wrapped functions.
+ #if _FORTIFY_SOURCE > 1
+
+ size_t __wrap___fread_chk(void * ptr, size_t ptrlen, size_t size, size_t n, FILE * stream)
+@@ -489,7 +470,7 @@
+ return res;
+ }
+
+-int __wrap___vfprintf_chk(FILE* stream, int flag, const char *format, _G_va_list ap)
++int __wrap___vfprintf_chk(FILE* stream, int flag, const char *format, va_list ap)
+ {
+ return dll_vfprintf(stream, format, ap);
+ }