Compare commits

..

2 Commits

Author SHA1 Message Date
Bananymous 70bbdbd8f5 LibC: Cleanup syslog output
add ": " after the identification and formatted output. syslog does not
require trailing newline so add it in case it is missing.
2025-08-16 22:56:03 +03:00
Bananymous df8365f0c7 ports/openssh: Configure with --disable-fd-passing
I though this wasn't needed because of my patch, but I didn't actually
test the code
2025-08-16 22:55:53 +03:00
2 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,7 @@ MAKE_INSTALL_TARGETS=('install-nokeys')
CONFIGURE_OPTIONS=(
'--sysconfdir=/etc'
'--sbindir=/usr/bin'
'--disable-fd-passing'
'CFLAGS=-Wno-deprecated-declarations'
)

View File

@ -1,5 +1,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
static const char* s_ident = nullptr;
@ -20,11 +21,15 @@ void syslog(int priority, const char* format, ...)
{
(void)priority;
if (s_ident)
fprintf(s_log_file, "%s", s_ident);
fprintf(s_log_file, "%s: ", s_ident);
va_list args;
va_start(args, format);
vfprintf(s_log_file, format, args);
va_end(args);
const size_t format_len = strlen(format);
if (format_len && format[format_len - 1] != '\n')
fputc('\n', s_log_file);
}
void closelog()