mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-09 07:58:24 +01:00
Fix build breaks on Solaris using Sun Studio.
Written by Ginn Chen & Eagle.Lu@ R=nealsid (although I don't have a Solaris machine to build on, & these changes look localized to Sun-only builds) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@314 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
e1a7efca7d
commit
4af5fe0b59
2 changed files with 12 additions and 3 deletions
|
|
@ -176,7 +176,9 @@ inline void RecalculateOffset(struct slist* cur_list, char *stabstr) {
|
|||
// Demangle using demangle library on Solaris.
|
||||
std::string Demangle(const char *mangled) {
|
||||
int status = 0;
|
||||
std::string str(mangled);
|
||||
char *demangled = (char *)malloc(demangleLen);
|
||||
|
||||
if (!demangled) {
|
||||
fprintf(stderr, "no enough memory.\n");
|
||||
goto out;
|
||||
|
|
@ -188,12 +190,11 @@ std::string Demangle(const char *mangled) {
|
|||
goto out;
|
||||
}
|
||||
|
||||
std::string str(demangled);
|
||||
str = demangled;
|
||||
free(demangled);
|
||||
return str;
|
||||
|
||||
out:
|
||||
return std::string(mangled);
|
||||
return str;
|
||||
}
|
||||
|
||||
bool WriteFormat(int fd, const char *fmt, ...) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue