aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2005-03-20 09:14:11 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2005-03-20 09:14:11 +0000
commitc6240b49fc0990b5b5b7bd09a29ae6a19368a1d8 (patch)
treeeaa16adf9b8fc258457989b96377a5fa8038a4f1
parentabeaeffeae5da5fbc6356a2309282ab79294bcee (diff)
downloadports-c6240b49fc0990b5b5b7bd09a29ae6a19368a1d8.tar.gz
ports-c6240b49fc0990b5b5b7bd09a29ae6a19368a1d8.zip
Notes
-rw-r--r--devel/libexecinfo/Makefile1
-rw-r--r--devel/libexecinfo/files/patch-execinfo.c45
2 files changed, 46 insertions, 0 deletions
diff --git a/devel/libexecinfo/Makefile b/devel/libexecinfo/Makefile
index fc7d7aaa570a..e3cf481eee2e 100644
--- a/devel/libexecinfo/Makefile
+++ b/devel/libexecinfo/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libexecinfo
PORTVERSION= 1.1
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.portaone.com/~sobomax/
diff --git a/devel/libexecinfo/files/patch-execinfo.c b/devel/libexecinfo/files/patch-execinfo.c
new file mode 100644
index 000000000000..3bf04f2a113a
--- /dev/null
+++ b/devel/libexecinfo/files/patch-execinfo.c
@@ -0,0 +1,45 @@
+--- execinfo.c.orig Sun Jul 18 22:21:09 2004
++++ execinfo.c Wed Feb 9 16:56:51 2005
+@@ -78,7 +78,6 @@
+ rval = malloc(clen);
+ if (rval == NULL)
+ return NULL;
+- (char **)cp = &(rval[size]);
+ for (i = 0; i < size; i++) {
+ if (dladdr(buffer[i], &info) != 0) {
+ if (info.dli_sname == NULL)
+@@ -92,14 +91,14 @@
+ 2 + /* " <" */
+ strlen(info.dli_sname) + /* "function" */
+ 1 + /* "+" */
+- D10(offset) + /* "offset */
++ 10 + /* "offset */
+ 5 + /* "> at " */
+ strlen(info.dli_fname) + /* "filename" */
+ 1; /* "\0" */
+ rval = realloc_safe(rval, clen + alen);
+ if (rval == NULL)
+ return NULL;
+- snprintf(cp, alen, "%p <%s+%d> at %s",
++ snprintf((char *) rval + clen, alen, "%p <%s+%d> at %s",
+ buffer[i], info.dli_sname, offset, info.dli_fname);
+ } else {
+ alen = 2 + /* "0x" */
+@@ -108,11 +107,14 @@
+ rval = realloc_safe(rval, clen + alen);
+ if (rval == NULL)
+ return NULL;
+- snprintf(cp, alen, "%p", buffer[i]);
++ snprintf((char *) rval + clen, alen, "%p", buffer[i]);
+ }
+- rval[i] = cp;
+- cp += alen;
++ rval[i] = (char *) clen;
++ clen += alen;
+ }
++
++ for (i = 0; i < size; i++)
++ rval[i] += (int) rval;
+
+ return rval;
+ }