From c0522ed374b7ba1ac7faa721ff62bb6d4b319347 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Mon, 2 Oct 2023 20:06:53 +0200 Subject: [PATCH] linux/bfd: define 'enum fake_disassembler_style' in case the real 'enum disassembler_style' is not defined in older dis-asm.h --- linux/bfd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux/bfd.c b/linux/bfd.c index 98fe9dec1..6ca550291 100644 --- a/linux/bfd.c +++ b/linux/bfd.c @@ -198,8 +198,15 @@ static int arch_bfdFPrintF(void* buf, const char* fmt, ...) { return ret; } +/* + * The 'disassembler_style' is defined with newert dis-asm.h versions only. Use a fake identifier, + * just to be able to define a function pointer. + */ +enum fake_disassembler_style { + hf_fake_dis_asm_style_unused, +}; static int arch_bfdFPrintFStyled( - void* buf, enum disassembler_style style HF_ATTR_UNUSED, const char* fmt, ...) { + void* buf, enum fake_disassembler_style style HF_ATTR_UNUSED, const char* fmt, ...) { va_list args; va_start(args, fmt); int ret = util_vssnprintf(buf, _HF_INSTR_SZ, fmt, args);