libs/libc/syslog/lib_syslog.c: Bring back the commit 2e8eba35ff 'libs/libc/syslog/lib_syslog.c: Fix syslog crash on 64bit simulation'. This has more detailed information:

https://stackoverflow.com/questions/10807310/platform-inconsistencies-with-vsprintf-and-va-list.
This commit is contained in:
Xiang Xiao 2019-12-05 07:17:55 -06:00 committed by Gregory Nutt
parent f109c5b99c
commit 948c566e39

View File

@ -77,7 +77,15 @@ void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
* of structures in the NuttX syscalls does not work. * of structures in the NuttX syscalls does not work.
*/ */
(void)nx_vsyslog(priority, fmt, &ap); #ifdef va_copy
va_list copy;
va_copy(copy, ap);
nx_vsyslog(priority, fmt, &copy);
va_end(copy);
#else
nx_vsyslog(priority, fmt, &ap);
#endif
} }
} }