=== modified file 'src/gps_functions.c' --- src/gps_functions.c 2010-10-18 00:49:13 +0000 +++ src/gps_functions.c 2010-10-27 07:31:47 +0000 @@ -689,6 +689,34 @@ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +#ifndef LOG_WARN +/* At least as of libgps 2.95 these are not exported. */ +#define LOG_ERROR 0 /* errors, display always */ +#define LOG_SHOUT 0 /* not an error but we should always see it */ +#define LOG_WARN 1 /* not errors but may indicate a problem */ +#define LOG_INF 2 /* key informative messages */ +#define LOG_DATA 3 /* log data management messages */ +#define LOG_PROG 4 /* progress messages */ +#define LOG_IO 5 /* IO to and from devices */ +#define LOG_SPIN 6 /* logging for catching spin bugs */ +#define LOG_RAW 7 /* raw low-level I/O */ +#endif +static int log_level = LOG_IO; +/* libgps sets this function as weak so that it is possible to + * override it. */ +void gpsd_report(int errlevel, const char *fmt, ...) +{ + if (errlevel <= log_level) + { + va_list ap; + + va_start(ap, fmt); + (void)vfprintf(stderr, fmt, ap); + va_end(ap); + } +} +#endif static gboolean