1 diff --git a/gpsd_report.c b/gpsd_report.c
2 index 956b5f0..5870692 100644
8 # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
9 -void gpsd_report(int errlevel UNUSED, const char *fmt, ...)
10 +void gpsd_report(int errlevel, const char *fmt, ...)
11 __attribute__ ((weak));
14 -void gpsd_report(int errlevel UNUSED, const char *fmt, ...)
15 +static int verbose = LOG_WARN;
17 +void gpsd_report(int errlevel, const char *fmt, ...)
18 /* stub logger for clients that don't supply one */
21 + if (errlevel <= verbose) {
25 + (void)vfprintf(stderr, fmt, ap);
31 - (void)vfprintf(stderr, fmt, ap);
33 +int gpsd_report_set_level(int errlevel, const char *fmt, ...)
35 + int oldlevel = verbose;