libs/libc/syslog/lib_syslog.c: Fix syslog crash on 64bit simulation.

This commit is contained in:
anchao 2018-08-26 06:50:47 -06:00 committed by Gregory Nutt
parent 1ee6083de3
commit 2e8eba35ff

View File

@ -65,6 +65,8 @@
void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
{
va_list copy;
/* Check if this priority is enabled */
if ((g_syslog_mask & LOG_MASK(priority)) != 0)
@ -76,7 +78,8 @@ void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
* of structures in the NuttX sycalls does not work.
*/
(void)nx_vsyslog(priority, fmt, &ap);
va_copy(copy, ap);
(void)nx_vsyslog(priority, fmt, &copy);
}
}