From 8494f2c318ce3401e167f4955c31fb9c0d379ee9 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Mon, 17 Dec 2018 17:05:05 +0100 Subject: [PATCH] Fix Thomas commit 776aa0c093cc6083cbb61d0db8e303209b21bbad which failedto build on Windows. --- tccelf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tccelf.c b/tccelf.c index ead8eed..d381c4f 100644 --- a/tccelf.c +++ b/tccelf.c @@ -866,12 +866,14 @@ static void relocate_rel(TCCState *s1, Section *sr) static int prepare_dynamic_rel(TCCState *s1, Section *sr) { ElfW_Rel *rel; - int sym_index, type, count; + int type, count; count = 0; for_each_elem(sr, 0, rel, ElfW_Rel) { - sym_index = ELFW(R_SYM)(rel->r_info); type = ELFW(R_TYPE)(rel->r_info); +#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) + int sym_index = ELFW(R_SYM)(rel->r_info); +#endif switch(type) { #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) #if defined(TCC_TARGET_I386)