From 86cedac0e1eafc226ce3536b7156cadd970bcdcf Mon Sep 17 00:00:00 2001 From: John Date: Fri, 21 Jul 2023 22:43:38 +0200 Subject: [PATCH] exempi: add patch to fix incompatibility with musl NULL --- srcpkgs/exempi/patches/nullptr.patch | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 srcpkgs/exempi/patches/nullptr.patch diff --git a/srcpkgs/exempi/patches/nullptr.patch b/srcpkgs/exempi/patches/nullptr.patch new file mode 100644 index 00000000000..27d5993fbfd --- /dev/null +++ b/srcpkgs/exempi/patches/nullptr.patch @@ -0,0 +1,51 @@ +src: https://raw.githubusercontent.com/chimera-linux/cports/01ab74ecd61e21095db32f37e16b6c285d93183e/main/exempi/patches/nullptr.patch + +commit d1e8054014adeafc606885844c1df65918ee7511 +Author: Daniel Kolesa +Date: Fri Apr 8 05:26:02 2022 +0200 + + fix up some invalid nullptr assignments + + C++11 onwards permits NULL to be of type nullptr_t, which prevents + assignment of NULL values to integer types. + +diff --git a/samples/source/common/DumpFile.cpp b/samples/source/common/DumpFile.cpp +index e3d8888..5d86bbb 100644 +--- a/samples/source/common/DumpFile.cpp ++++ b/samples/source/common/DumpFile.cpp +@@ -2471,7 +2471,7 @@ DumpISOBoxes(LFA_FileRef file, XMP_Uns32 maxBoxLen, std::string _isoPath) + DumpTIFF(tiffContent, tiffLength, offset, "HEIF Exif", "HEIF:Exif"); + LFA_Seek(file, keep, SEEK_SET, &ok); + assertMsg("seek failed", ok); +- exif_item_id = NULL; ++ exif_item_id = 0; + } + } + //Get the data for xmp - using value from mime_item_id +@@ -2489,7 +2489,7 @@ DumpISOBoxes(LFA_FileRef file, XMP_Uns32 maxBoxLen, std::string _isoPath) + DumpXMP(xmpContent, xmpLength, offset, "XMP"); + LFA_Seek(file, keep, SEEK_SET, &ok); + assertMsg("seek failed", ok); +- mime_item_id = NULL; ++ mime_item_id = 0; + } + } + break; +@@ -2641,7 +2641,7 @@ DumpISOBoxes(LFA_FileRef file, XMP_Uns32 maxBoxLen, std::string _isoPath) + DumpTIFF(tiffContent, tiffLength, offset, "HEIF Exif", "HEIF:Exif"); + LFA_Seek(file, keep, SEEK_SET, &ok); + assertMsg("seek failed", ok); +- exif_item_id = NULL; ++ exif_item_id = 0; + } + } + //Get the data for xmp - using value from mime_item_id +@@ -2659,7 +2659,7 @@ DumpISOBoxes(LFA_FileRef file, XMP_Uns32 maxBoxLen, std::string _isoPath) + DumpXMP(xmpContent, xmpLength, offset, "XMP"); + LFA_Seek(file, keep, SEEK_SET, &ok); + assertMsg("seek failed", ok); +- mime_item_id = NULL; ++ mime_item_id = 0; + } + } +