Accepting request 1102674 from home:dirkmueller:Factory

- add dcraw-glibc-2.38.patch to fix prototype clash on memmem with glibc 2.38+

OBS-URL: https://build.opensuse.org/request/show/1102674
OBS-URL: https://build.opensuse.org/package/show/graphics/dcraw?expand=0&rev=56
This commit is contained in:
Fridrich Strba 2023-08-07 09:58:14 +00:00 committed by Git OBS Bridge
parent e08420c5d3
commit 77a3124585
3 changed files with 32 additions and 1 deletions

24
dcraw-glibc-2.38.patch Normal file
View File

@ -0,0 +1,24 @@
Index: dcraw/parse.c
===================================================================
--- dcraw.orig/parse.c
+++ dcraw/parse.c
@@ -1213,7 +1213,7 @@ void parse_qt (int level, int end)
}
}
-char *memmem (char *haystack, size_t haystacklen,
+static char *my_memmem (char *haystack, size_t haystacklen,
char *needle, size_t needlelen)
{
char *c;
@@ -1239,8 +1239,8 @@ void identify()
tread (head, 1, 32, ifp);
tseek (ifp, 0, SEEK_END);
fsize = ftell(ifp);
- if ((cp = memmem (head, 32, "MMMM", 4)) ||
- (cp = memmem (head, 32, "IIII", 4))) {
+ if ((cp = my_memmem (head, 32, "MMMM", 4)) ||
+ (cp = my_memmem (head, 32, "IIII", 4))) {
parse_phase_one (cp-head);
if (cp-head) parse_tiff (0,0);
} else if (order == 0x4949 || order == 0x4d4d) {

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 7 09:53:25 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add dcraw-glibc-2.38.patch to fix prototype clash on memmem with glibc 2.38+
-------------------------------------------------------------------
Tue Apr 12 11:30:56 UTC 2022 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package dcraw
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -47,6 +47,7 @@ Patch3: dcraw-CVE-2018-19655.patch
Patch4: dcraw-CVE-2018-5801.patch
Patch5: iowrappers.patch
Patch6: dcraw-CVE-2021-3624.patch
Patch7: dcraw-glibc-2.38.patch
BuildRequires: gettext-runtime
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
@ -68,6 +69,7 @@ cp -a %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} .
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing -fstack-protector-all"