From: Dagg Stompler <daggs@gmx.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] kodi-texturepacker: fix compiltion error
Date: Fri, 19 Jan 2018 18:42:32 +0200 [thread overview]
Message-ID: <20180119164232.1559-1-daggs@gmx.com> (raw)
backport fix the following error: declaration of ?void* reallocarray(void*, size_t, size_t) throw ()? has a different exception specifier
from upstream kodi which can be reproduced using the following defconfig:
BR2_x86_64=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_PYTHON=y
BR2_PACKAGE_PYTHON_PY_PYC=y
Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
.../kodi-texturepacker/0002-fix_reallocarray.patch | 169 +++++++++++++++++++++
1 file changed, 169 insertions(+)
create mode 100644 package/kodi-texturepacker/0002-fix_reallocarray.patch
diff --git a/package/kodi-texturepacker/0002-fix_reallocarray.patch b/package/kodi-texturepacker/0002-fix_reallocarray.patch
new file mode 100644
index 0000000000..eb4ed349bd
--- /dev/null
+++ b/package/kodi-texturepacker/0002-fix_reallocarray.patch
@@ -0,0 +1,169 @@
+From ebc5dfcad836936a14e6f18fd7faa377b3c804e7 Mon Sep 17 00:00:00 2001
+From: MilhouseVH <milhouseVH.github@nmacleod.com>
+Date: Mon, 6 Nov 2017 11:47:28 +0000
+Subject: [PATCH] TexturePacker: use C++ headers
+
+---
+ tools/depends/native/TexturePacker/src/SimpleFS.h | 4 ++--
+ tools/depends/native/TexturePacker/src/TexturePacker.cpp | 2 +-
+ tools/depends/native/TexturePacker/src/XBTFWriter.cpp | 6 +++---
+ tools/depends/native/TexturePacker/src/XBTFWriter.h | 2 +-
+ tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp | 2 +-
+ tools/depends/native/TexturePacker/src/md5.h | 4 ++--
+ 6 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/tools/depends/native/TexturePacker/src/SimpleFS.h b/tools/depends/native/TexturePacker/src/SimpleFS.h
+index c48814c0ad..c2288cf8de 100644
+--- a/tools/depends/native/TexturePacker/src/SimpleFS.h
++++ b/tools/depends/native/TexturePacker/src/SimpleFS.h
+@@ -20,9 +20,9 @@
+ *
+ */
+
+-#include <stdio.h>
++#include <cstdio>
+ #include <string>
+-#include <stdint.h>
++#include <cstdint>
+
+ class CFile
+ {
+diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp
+index ba618be574..045c5ce38d 100644
+--- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp
++++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp
+@@ -22,7 +22,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #define __STDC_FORMAT_MACROS
+-#include <inttypes.h>
++#include <cinttypes>
+ #define platform_stricmp _stricmp
+ #else
+ #define platform_stricmp stricmp
+diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
+index 9e2493369b..2e80ba674c 100644
+--- a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
++++ b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
+@@ -19,14 +19,14 @@
+ */
+
+ #define __STDC_FORMAT_MACROS
+-#include <inttypes.h>
++#include <cinttypes>
+ #if defined(TARGET_FREEBSD) || defined(TARGET_DARWIN)
+-#include <stdlib.h>
++#include <cstdlib>
+ #elif !defined(TARGET_DARWIN)
+ #include <malloc.h>
+ #endif
+ #include <memory.h>
+-#include <string.h>
++#include <cstring>
+
+ #include "XBTFWriter.h"
+ #include "guilib/XBTFReader.h"
+diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.h b/tools/depends/native/TexturePacker/src/XBTFWriter.h
+index 7509303a51..d5cf1a2965 100644
+--- a/tools/depends/native/TexturePacker/src/XBTFWriter.h
++++ b/tools/depends/native/TexturePacker/src/XBTFWriter.h
+@@ -23,7 +23,7 @@
+
+ #include <vector>
+ #include <string>
+-#include <stdio.h>
++#include <cstdio>
+
+ #include "guilib/XBTF.h"
+
+diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+index 56c22f7c3a..3ddb20fe88 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
++++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+@@ -20,7 +20,7 @@
+
+ #include "GifHelper.h"
+ #include <algorithm>
+-#include <stdlib.h>
++#include <cstdlib>
+ #include <cstring>
+
+ #define UNSIGNED_LITTLE_ENDIAN(lo, hi) ((lo) | ((hi) << 8))
+diff --git a/tools/depends/native/TexturePacker/src/md5.h b/tools/depends/native/TexturePacker/src/md5.h
+index 456e5be17f..4bb48e0810 100644
+--- a/tools/depends/native/TexturePacker/src/md5.h
++++ b/tools/depends/native/TexturePacker/src/md5.h
+@@ -23,8 +23,8 @@
+ #ifndef MD5_H
+ #define MD5_H
+
+-#include <string.h> /* for memcpy() */
+-#include <stdint.h>
++#include <cstring> /* for memcpy() */
++#include <cstdint>
+
+ struct MD5Context
+ {
+--
+2.16.0
+
+From ff3e6dad5fdb7b9a2985b2547c8020c709af0340 Mon Sep 17 00:00:00 2001
+From: MilhouseVH <milhouseVH.github@nmacleod.com>
+Date: Mon, 6 Nov 2017 18:05:17 +0000
+Subject: [PATCH] TexturePacker: drop unused variable
+
+---
+ tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp b/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp
+index 53f5e9beb7..b0f18bed68 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp
++++ b/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp
+@@ -72,7 +72,6 @@ bool JPGDecoder::LoadFile(const std::string &filename, DecodedFrames &frames)
+ struct jpeg_decompress_struct cinfo;
+ struct jpeg_error_mgr jerr;
+
+- char *linha;
+ int ImageSize;
+
+ cinfo.err = jpeg_std_error(&jerr);
+@@ -89,7 +88,6 @@ bool JPGDecoder::LoadFile(const std::string &filename, DecodedFrames &frames)
+ DecodedFrame frame;
+
+ frame.rgbaImage.pixels = (char *)new char[ImageSize];
+- linha = (char *)frame.rgbaImage.pixels;
+
+ unsigned char *scanlinebuff = new unsigned char[3 * cinfo.image_width];
+ unsigned char *dst = (unsigned char *)frame.rgbaImage.pixels;
+--
+2.16.0
+
+From ee441543be07de1222bcff2587bfcdb5c1231989 Mon Sep 17 00:00:00 2001
+From: MilhouseVH <milhouseVH.github@nmacleod.com>
+Date: Mon, 6 Nov 2017 21:02:06 +0000
+Subject: [PATCH] TexturePacker: include GifHelper after system headers
+
+---
+ tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+index 3ddb20fe88..9ced4ec5bc 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
++++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+@@ -18,10 +18,10 @@
+ *
+ */
+
+-#include "GifHelper.h"
+ #include <algorithm>
+ #include <cstdlib>
+ #include <cstring>
++#include "GifHelper.h"
+
+ #define UNSIGNED_LITTLE_ENDIAN(lo, hi) ((lo) | ((hi) << 8))
+ #define GIF_MAX_MEMORY 82944000U // about 79 MB, which is equivalent to 10 full hd frames.
+--
+2.16.0
+
--
2.16.0
next reply other threads:[~2018-01-19 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 16:42 Dagg Stompler [this message]
2018-01-29 21:34 ` [Buildroot] [PATCH] kodi-texturepacker: fix compiltion error Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180119164232.1559-1-daggs@gmx.com \
--to=daggs@gmx.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox