[113162] trunk/dports/devel/cctools

jeremyhu at macports.org jeremyhu at macports.org
Sun Nov 10 22:43:39 PST 2013


Revision: 113162
          https://trac.macports.org/changeset/113162
Author:   jeremyhu at macports.org
Date:     2013-11-10 22:43:39 -0800 (Sun, 10 Nov 2013)
Log Message:
-----------
cctools: Build fix for Snow Leopard

Modified Paths:
--------------
    trunk/dports/devel/cctools/Portfile

Added Paths:
-----------
    trunk/dports/devel/cctools/files/snowleopard-strnlen.patch

Modified: trunk/dports/devel/cctools/Portfile
===================================================================
--- trunk/dports/devel/cctools/Portfile	2013-11-11 06:40:09 UTC (rev 113161)
+++ trunk/dports/devel/cctools/Portfile	2013-11-11 06:43:39 UTC (rev 113162)
@@ -42,6 +42,9 @@
     patchfiles-delete   cctools-829-lto.patch PR-37520.patch cctools-839-static-dis_info.patch
     patchfiles-append   cctools-806-lto.patch PR-9087924.patch PR-9830754.patch cctools-822-no-lto.patch PR-11136237.patch PR-12475288.patch
 } else {
+    if {${os.major} < 11} {
+        patchfiles-append snowleopard-strnlen.patch
+    }
     supported_archs     i386 x86_64
 }
 

Added: trunk/dports/devel/cctools/files/snowleopard-strnlen.patch
===================================================================
--- trunk/dports/devel/cctools/files/snowleopard-strnlen.patch	                        (rev 0)
+++ trunk/dports/devel/cctools/files/snowleopard-strnlen.patch	2013-11-11 06:43:39 UTC (rev 113162)
@@ -0,0 +1,21 @@
+--- otool/ofile_print.c.orig	2013-11-10 22:33:14.000000000 -0800
++++ otool/ofile_print.c	2013-11-10 22:34:19.000000000 -0800
+@@ -225,6 +225,18 @@
+ #include "stuff/guess_short_name.h"
+ #include "ofile_print.h"
+ 
++static size_t
++strnlen(const char *s, size_t maxlen)
++{
++	size_t len;
++
++	for (len = 0; len < maxlen; len++, s++) {
++		if (!*s)
++			break;
++	}
++	return (len);
++}
++
+ /* <mach/loader.h> */
+ /* The maximum section alignment allowed to be specified, as a power of two */
+ #define MAXSECTALIGN		15 /* 2**15 or 0x8000 */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131110/851f3fdd/attachment.html>


More information about the macports-changes mailing list