Index: head/devel/libexecinfo/Makefile =================================================================== --- head/devel/libexecinfo/Makefile (revision 445057) +++ head/devel/libexecinfo/Makefile (revision 445058) @@ -1,29 +1,30 @@ # Created by: Maxim Sobolev # $FreeBSD$ PORTNAME= libexecinfo PORTVERSION= 1.1 PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= LOCAL/itetcu MAINTAINER= ports@FreeBSD.org COMMENT= Library for inspecting program's backtrace -OPTIONS_DEFINE= DOCS +LICENSE= BSD2CLAUSE USES= tar:bzip2 uidfix USE_LDCONFIG= yes -CFLAGS= -fno-omit-frame-pointer MAKE_FLAGS= LIBDIR=${PREFIX}/lib \ INCLUDEDIR=${PREFIX}/include +CFLAGS+= -fno-omit-frame-pointer + PORTDOCS= README -CFLAGS_amd64= -fno-omit-frame-pointer +OPTIONS_DEFINE= DOCS -post-install: +post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include Index: head/devel/libexecinfo/files/patch-Makefile =================================================================== --- head/devel/libexecinfo/files/patch-Makefile (revision 445057) +++ head/devel/libexecinfo/files/patch-Makefile (revision 445058) @@ -1,10 +1,10 @@ ---- Makefile.orgi 2013-02-05 23:13:54.375834807 +0800 -+++ Makefile 2013-02-05 23:14:13.106833334 +0800 -@@ -34,6 +34,7 @@ +--- Makefile.orig 2004-07-19 05:19:55 UTC ++++ Makefile +@@ -34,6 +34,7 @@ SHLIB_MAJOR= 1 SHLIB_MINOR= 0 NOPROFILE= yes +NO_PROFILE= yes DPADD= ${LIBM} LDADD= -lm Index: head/devel/libexecinfo/files/patch-execinfo.c =================================================================== --- head/devel/libexecinfo/files/patch-execinfo.c (revision 445057) +++ head/devel/libexecinfo/files/patch-execinfo.c (revision 445058) @@ -1,64 +1,64 @@ ---- execinfo.c.orig +--- execinfo.c.orig 2004-07-19 05:21:09 UTC +++ execinfo.c -@@ -69,7 +69,8 @@ +@@ -69,7 +69,8 @@ backtrace(void **buffer, int size) char ** backtrace_symbols(void *const *buffer, int size) { - int i, clen, alen, offset; + size_t clen, alen; + int i, offset; char **rval; char *cp; Dl_info info; -@@ -78,7 +79,6 @@ +@@ -78,7 +79,6 @@ backtrace_symbols(void *const *buffer, i 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 +92,14 @@ +@@ -92,14 +92,14 @@ backtrace_symbols(void *const *buffer, i 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,12 +108,15 @@ +@@ -108,12 +108,15 @@ backtrace_symbols(void *const *buffer, i 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] += (long) rval; + return rval; } -@@ -155,6 +158,6 @@ +@@ -155,6 +158,6 @@ backtrace_symbols_fd(void *const *buffer return; snprintf(buf, len, "%p\n", buffer[i]); } - write(fd, buf, len - 1); + write(fd, buf, strlen(buf)); } }