Modified: trunk/dports/devel/safestr/Portfile (83429 => 83430)
--- trunk/dports/devel/safestr/Portfile 2011-09-01 10:28:38 UTC (rev 83429)
+++ trunk/dports/devel/safestr/Portfile 2011-09-01 11:27:52 UTC (rev 83430)
@@ -21,4 +21,8 @@
checksums md5 a07412095226b0f6fcbd1d7acd4be732 \
sha256 791256efff74317273cf8b64c9ad360b7bce16d561b4350bb7de9776c5855b6c
+depends_lib port:xxl
+
+patchfiles safefmt.c.patch
+
configure.args --with-xxl=${prefix}
Added: trunk/dports/devel/safestr/files/safefmt.c.patch (0 => 83430)
--- trunk/dports/devel/safestr/files/safefmt.c.patch (rev 0)
+++ trunk/dports/devel/safestr/files/safefmt.c.patch 2011-09-01 11:27:52 UTC (rev 83430)
@@ -0,0 +1,32 @@
+--- safefmt.c.orig 2005-01-31 05:24:12.000000000 +1100
++++ safefmt.c 2011-09-01 21:18:23.000000000 +1000
+@@ -489,10 +489,10 @@ scan_format_string(isafestr_t ifmt, argl
+ SET_ARGLIST_TYPE(format_arg, type);
+ }
+
+- ap = arglist->ap;
++ va_copy(ap, arglist->ap);
+ for (x = arglist->current; x < max_arg; x++)
+ load_argument(x, arglist);
+- arglist->ap = ap;
++ va_copy(arglist->ap, ap);
+
+ arglist->max = max_arg;
+ arglist->scanned = 1;
+@@ -675,7 +675,7 @@ parse_format_string(output_fn outfn, voi
+ arglist.current = 0;
+ arglist.max = 0;
+ arglist.scanned = 0;
+- arglist.ap = ap;
++ va_copy(arglist.ap, ap);
+ memset(arglist.list, 0, sizeof(arglist.list));
+
+ cs_d = 0;
+@@ -683,7 +683,6 @@ parse_format_string(output_fn outfn, voi
+ padding = NULL;
+ *nbytes = padding_size = 0;
+ arglist.current = arglist.max = arglist.scanned = 0;
+- arglist.ap = ap;
+ trusted = (ifmt->hdr.flags & SAFESTR_TRUSTED) == SAFESTR_TRUSTED;
+
+ for (c = start = ifmt->str; c < ifmt->str + ifmt->hdr.length; start = ++c)