mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
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:
@@ -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.
|
||||
*/
|
||||
|
||||
(void)nx_vsyslog(priority, fmt, &ap);
|
||||
#ifdef va_copy
|
||||
va_list copy;
|
||||
|
||||
va_copy(copy, ap);
|
||||
nx_vsyslog(priority, fmt, ©);
|
||||
va_end(copy);
|
||||
#else
|
||||
nx_vsyslog(priority, fmt, &ap);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user