diff --git a/dcraw-glibc-2.38.patch b/dcraw-glibc-2.38.patch new file mode 100644 index 0000000..7ff0c48 --- /dev/null +++ b/dcraw-glibc-2.38.patch @@ -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) { diff --git a/dcraw.changes b/dcraw.changes index 2d78d0c..b8786b3 100644 --- a/dcraw.changes +++ b/dcraw.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 7 09:53:25 UTC 2023 - Dirk Müller + +- 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 diff --git a/dcraw.spec b/dcraw.spec index 036074c..a327fa1 100644 --- a/dcraw.spec +++ b/dcraw.spec @@ -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"