mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 03:45:39 +01:00
be45cc90b4
The SoftHSM library writes to the system logs. Preload this library to make it write to stderr instead.
42 lines
814 B
C
42 lines
814 B
C
#include <dlfcn.h>
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <syslog.h>
|
|
|
|
|
|
void openlog( const char *ident, int option, int facility )
|
|
{
|
|
(void) ident;
|
|
(void) option;
|
|
(void) facility;
|
|
}
|
|
|
|
/* POSIX API */
|
|
void syslog( int priority, const char *format, ... )
|
|
{
|
|
va_list args;
|
|
va_start( args, format );
|
|
vfprintf( stderr, format, args );
|
|
va_end( args );
|
|
}
|
|
|
|
/* Linux ABI
|
|
* http://refspecs.linux-foundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---syslog-chk-1.html
|
|
*/
|
|
void __syslog_chk( int priority, int flag, const char *format, ... )
|
|
{
|
|
va_list args;
|
|
(int) flag;
|
|
va_start( args, format );
|
|
vfprintf( stderr, format, args );
|
|
fputc( '\n', stderr );
|
|
va_end( args );
|
|
}
|
|
|
|
void closelog( void )
|
|
{
|
|
/* no-op */
|
|
}
|