/*
- Copyright (C) 2016, 2017 "IoT.bzh"
+ Copyright (C) 2016-2019 "IoT.bzh"
author: José Bollo <jose.bollo@iot.bzh>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
static char *appname;
void vverbose(int level, const char *file, int line, const char *fmt, va_list args)
{
+ int saverr = errno;
int tty = isatty(fileno(stderr));
+ errno = saverr;
fprintf(stderr, "%s: ", prefixes[LEVEL(level)] + (tty ? 4 : 0));
vfprintf(stderr, fmt, args);