Skip to content

Instantly share code, notes, and snippets.

@ChrisTheCoolHut
Created January 22, 2019 17:30
Show Gist options
  • Save ChrisTheCoolHut/a6627981b08ae5ab47ebdff9d41e967f to your computer and use it in GitHub Desktop.
Save ChrisTheCoolHut/a6627981b08ae5ab47ebdff9d41e967f to your computer and use it in GitHub Desktop.
Syslog hook to print to STDOUT
#define _GNU_SOURCE
#include <stdarg.h>
#include <stdio.h>
#include <dlfcn.h>
//dockcross-linux-armv5 bash -c '$CC verbal_syslog.c -fPIC -shared -ldl -o Verbal_syslog_static.so'
void syslog(int priority, const char* format, ...)
{
va_list args;
va_start(args, format);
vprintf(format, args);
va_end(args);
printf("\n");
fflush(stdout);
printf("\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment