Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 459432 Details for
Bug 470884
dev-libs/elfutils: build fails on uclibc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
elfutils-0.166-asprintf-insteadof-obstack_printf.patch
elfutils-0.166-asprintf-insteadof-obstack_printf.patch (text/plain), 2.30 KB, created by
René Rhéaume
on 2017-01-10 02:25:33 UTC
(
hide
)
Description:
elfutils-0.166-asprintf-insteadof-obstack_printf.patch
Filename:
MIME Type:
Creator:
René Rhéaume
Created:
2017-01-10 02:25:33 UTC
Size:
2.30 KB
patch
obsolete
>diff -urp elfutils-0.166.orig/src/nm.c elfutils-0.166/src/nm.c >--- elfutils-0.166.orig/src/nm.c 2016-03-31 04:47:17.000000000 -0400 >+++ elfutils-0.166/src/nm.c 2017-01-09 20:19:03.020321708 -0500 >@@ -33,7 +33,6 @@ > #include <libdw.h> > #include <libintl.h> > #include <locale.h> >-#include <obstack.h> > #include <search.h> > #include <stdbool.h> > #include <stdio.h> >@@ -1242,10 +1241,7 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehd > size_t nentries = size / (entsize ?: 1); > > >-#define obstack_chunk_alloc xmalloc >-#define obstack_chunk_free free >- struct obstack whereob; >- obstack_init (&whereob); >+ char* whereob = NULL; > > /* Get a DWARF debugging descriptor. It's no problem if this isn't > possible. We just won't print any line number information. */ >@@ -1405,12 +1401,10 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehd > const char *file = dwarf_linesrc (line, NULL, NULL); > file = (file != NULL) ? basename (file) : "???"; > int n; >- n = obstack_printf (&whereob, "%s:%d%c", file, >- lineno, '\0'); >- sym_mem[nentries_used].where >- = obstack_finish (&whereob); >+ n = asprintf (&whereob, "%s:%d%c", file, lineno, '\0'); >+ sym_mem[nentries_used].where = whereob; > >- /* The return value of obstack_print included the >+ /* The return value of asprintf included the > NUL byte, so subtract one. */ > if (--n > (int) longest_where) > longest_where = (size_t) n; >@@ -1433,13 +1427,13 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehd > if (found != NULL) > { > /* We found the line. */ >- int n = obstack_printf (&whereob, "%s:%" PRIu64 "%c", >+ int n = asprintf (&whereob, "%s:%" PRIu64 "%c", > basename ((*found)->file), > (*found)->lineno, > '\0'); >- sym_mem[nentries_used].where = obstack_finish (&whereob); >+ sym_mem[nentries_used].where = whereob; > >- /* The return value of obstack_print included the >+ /* The return value of asprintf included the > NUL byte, so subtract one. */ > if (--n > (int) longest_where) > longest_where = (size_t) n; >@@ -1491,8 +1485,6 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehd > if (nentries * sizeof (sym_mem[0]) >= MAX_STACK_ALLOC) > free (sym_mem); > >- obstack_free (&whereob, NULL); >- > if (dbg != NULL) > { > tdestroy (global_root, free); >Only in elfutils-0.166/src: nm.c~
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 470884
:
348828
|
348830
|
348832
|
348908
|
349604
|
349608
|
350476
|
350478
|
350480
|
350482
|
350484
|
350486
|
376194
|
376196
|
376198
|
459426
|
459428
|
459430
| 459432 |
459434