Commit 957bd567 authored by Cedric Roux's avatar Cedric Roux
Browse files

hotfix: let compilation work

When compiling in debug mode, the 'inline' semantics of C99 led to the errors:

/roux/w25/openairinterface5g/common/utils/LOG/log.c:479: undefined reference to `log_header'
libUTIL.a(log.c.o): In function `log_dump':
/roux/w25/openairinterface5g/common/utils/LOG/log.c:502: undefined reference to `log_header'
collect2: error: ld returned 1 exit status

Let's use static instead of inline.
parent 75d7949c
...@@ -454,7 +454,7 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; ...@@ -454,7 +454,7 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ;
} }
} }
int inline log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) { static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
char threadname[PR_SET_NAME]; char threadname[PR_SET_NAME];
return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s", return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
log_level_highlight_end[level], log_level_highlight_end[level],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment