Browse Source

minidlna: fix GCC 10 multiple def compilation error

Diffrent file use its own setjmp_buffer, thus
we have two global variables called setjmp_buffer

I am not sure if we should use only one instance of it.

The patch sent upstream uses a similar approach.

https://sourceforge.net/p/minidlna/bugs/327/

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
lilik-openwrt-22.03
Syrone Wong 5 years ago
committed by Rosen Penev
parent
commit
e8f0944337
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
2 changed files with 23 additions and 1 deletions
  1. +1
    -1
      multimedia/minidlna/Makefile
  2. +22
    -0
      multimedia/minidlna/patches/999-05-fix-setjmp-buffer-multiple-def.patch

+ 1
- 1
multimedia/minidlna/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna PKG_NAME:=minidlna
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.code.sf.net/p/minidlna/git PKG_SOURCE_URL:=https://git.code.sf.net/p/minidlna/git


+ 22
- 0
multimedia/minidlna/patches/999-05-fix-setjmp-buffer-multiple-def.patch View File

@ -0,0 +1,22 @@
--- a/image_utils.c
+++ b/image_utils.c
@@ -190,7 +190,7 @@ jpeg_memory_src(j_decompress_ptr cinfo,
src->pub.bytes_in_buffer = bufsize;
}
-jmp_buf setjmp_buffer;
+static jmp_buf setjmp_buffer;
/* Don't exit on error like libjpeg likes to do */
static void
libjpeg_error_handler(j_common_ptr cinfo)
--- a/metadata.c
+++ b/metadata.c
@@ -502,7 +502,7 @@ GetAudioMetadata(const char *path, const
}
/* For libjpeg error handling */
-jmp_buf setjmp_buffer;
+static jmp_buf setjmp_buffer;
static void
libjpeg_error_handler(j_common_ptr cinfo)
{

Loading…
Cancel
Save