[137001] trunk/dports/graphics/dcraw
ryandesign at macports.org
ryandesign at macports.org
Tue Jun 2 02:07:11 PDT 2015
Revision: 137001
https://trac.macports.org/changeset/137001
Author: ryandesign at macports.org
Date: 2015-06-02 02:07:11 -0700 (Tue, 02 Jun 2015)
Log Message:
-----------
dcraw: fix compile failure on OS X 10.6 and earlier by avoiding using strnlen
Modified Paths:
--------------
trunk/dports/graphics/dcraw/Portfile
Added Paths:
-----------
trunk/dports/graphics/dcraw/files/patch-dcraw.c.diff
Modified: trunk/dports/graphics/dcraw/Portfile
===================================================================
--- trunk/dports/graphics/dcraw/Portfile 2015-06-02 08:58:32 UTC (rev 137000)
+++ trunk/dports/graphics/dcraw/Portfile 2015-06-02 09:07:11 UTC (rev 137001)
@@ -36,6 +36,8 @@
xinstall -W ${filespath} Makefile.in ${worksrcpath}/Makefile
}
+patchfiles patch-dcraw.c.diff
+
variant universal {}
build.args CC="${configure.cc} [get_canonical_archflags]" \
Added: trunk/dports/graphics/dcraw/files/patch-dcraw.c.diff
===================================================================
--- trunk/dports/graphics/dcraw/files/patch-dcraw.c.diff (rev 0)
+++ trunk/dports/graphics/dcraw/files/patch-dcraw.c.diff 2015-06-02 09:07:11 UTC (rev 137001)
@@ -0,0 +1,13 @@
+Patch from developer to fix build on Mac OS X < 10.7 which doesn't have strnlen
+--- dcraw.c 2015/05/25 02:29:14 1.476
++++ dcraw.c 2015/06/01 16:04:57
+@@ -9561,7 +9561,8 @@
+ if (type == 1 && count <= 4)
+ FORC(4) tt->val.c[c] = val >> (c << 3);
+ else if (type == 2) {
+- count = strnlen((char *)th + val, count-1) + 1;
++ ((char *)th)[val+count-1] = 0;
++ count = strlen((char *)th + val) + 1;
+ if (count <= 4)
+ FORC(4) tt->val.c[c] = ((char *)th)[val+c];
+ } else if (type == 3 && count <= 2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150602/8e85ddec/attachment.html>
More information about the macports-changes
mailing list