Browse Source

Fix CONFIG_WPA_TRACE=y compilation without CONFIG_WPA_TRACE_BFD=y

syms is defined only for WPA_TRACE_BFD:

../src/utils/trace.c: In function ‘wpa_trace_deinit’:
../src/utils/trace.c:372:7: error: ‘syms’ undeclared (first use in this function)
  free(syms);
       ^
../src/utils/trace.c:372:7: note: each undeclared identifier is reported only once for each function it appears in
make: *** [../src/utils/trace.o] Error 1
make: *** Waiting for unfinished jobs....

Add appropriate #ifdef.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Eliad Peller 9 years ago
parent
commit
4a6e9e5599
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/utils/trace.c

+ 2 - 0
src/utils/trace.c

@@ -369,8 +369,10 @@ void wpa_trace_check_ref(const void *addr)
 
 void wpa_trace_deinit(void)
 {
+#ifdef WPA_TRACE_BFD
 	free(syms);
 	syms = NULL;
+#endif /* WPA_TRACE_BFD */
 }
 
 #endif /* WPA_TRACE */