diff mbox

_dl_exception_create_format: Support %x/%lx/%Zx

Message ID CAMe9rOqQwz07ur3P4HNDCU7ifozqR2VKihu8478pn1vEu5Zx3g@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu Nov. 30, 2018, 2:48 a.m. UTC
On Thu, Nov 29, 2018 at 4:02 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Thu, 29 Nov 2018, H.J. Lu wrote:
>
> > This is what I actually checked in.
>
> Your commit message doesn't say anything about how the commit was tested
> (please include that information in commit messages).  It causes a lot of
> build failures of the form:
>
> dl-exception.c: In function '_dl_exception_create_format':
> dl-exception.c:189:14: error: implicit declaration of function '_itoa'
> [-Werror=implicit-function-declaration]
>    char *cp = _itoa (num, wptr, 16, 0);
>               ^~~~~
> dl-exception.c:189:14: error: initialization of 'char *' from 'int' makes
> pointer from integer without a cast [-Werror=int-conversion]
> dl-exception.c:202:16: error: initialization of 'char *' from 'int' makes
> pointer from integer without a cast [-Werror=int-conversion]
>      char *cp = _itoa (num, wptr, 16, 0);
>                 ^~~~~
>
> (on aarch64, arm, hppa, i486, m68k, mips, ...)
>

I am testing this patch now.
diff mbox

Patch

diff --git a/elf/dl-exception.c b/elf/dl-exception.c
index 1e41d89a7d..3e8e0ba3f1 100644
--- a/elf/dl-exception.c
+++ b/elf/dl-exception.c
@@ -23,6 +23,7 @@ 
 #include <stdint.h>
 #include <string.h>
 #include <unistd.h>
+#include <_itoa.h>

 /* This message we return as a last resort.  We define the string in a
    variable since we have to avoid freeing it and so have to enable