diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c index 78dec6f4b9b..f433b9d55ac 100644 --- a/sim/erc32/interf.c +++ b/sim/erc32/interf.c @@ -156,6 +156,21 @@ run_sim(struct pstate *sregs, uint64_t icount, int dis) return TIME_OUT; } +static int +fprintf_styled (void *stream, enum disassembler_style style, + const char *fmt, ...) +{ + int ret; + FILE *out = (FILE *) stream; + va_list args; + + va_start (args, fmt); + ret = vfprintf (out, fmt, args); + va_end (args); + + return ret; +} + SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, char * const *argv) diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c index 12eb21f15a7..1d3ea139c23 100644 --- a/sim/erc32/sis.c +++ b/sim/erc32/sis.c @@ -138,7 +138,7 @@ run_sim(struct pstate *sregs, uint64_t icount, int dis) return TIME_OUT; } -int +static int fprintf_styled (void *stream, enum disassembler_style style, const char *fmt, ...) { diff --git a/sim/erc32/sis.h b/sim/erc32/sis.h index 3a276670402..71033137f2c 100644 --- a/sim/erc32/sis.h +++ b/sim/erc32/sis.h @@ -204,8 +204,6 @@ extern void init_regs (struct pstate *sregs); /* interf.c */ extern int run_sim (struct pstate *sregs, uint64_t icount, int dis); -extern int fprintf_styled (void *stream, enum disassembler_style style, - const char *fmt, ...) ATTRIBUTE_PRINTF (3, 4); /* float.c */ extern int get_accex (void);