diff --git a/SConstruct b/SConstruct index 36d0be7..60785d5 100644 --- a/SConstruct +++ b/SConstruct @@ -656,7 +656,7 @@ else: # check function after libraries, because some function require library # for example clock_gettime() require librt on Linux - for f in ("daemon", "strlcpy", "strlcat", "clock_gettime","getsid"): + for f in ("daemon", "strlcpy", "strlcat", "clock_gettime", "getsid", "gmtime"): if config.CheckFunc(f): confdefs.append("#define HAVE_%s 1\n" % f.upper()) else: diff --git a/gpsd.h-tail b/gpsd.h-tail index 2cf5e72..29d21b6 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -1054,10 +1054,10 @@ static /address@hidden@*/ inline void memory_barrier(void) #endif /* S_SPLINT_S */ } -#ifndef __GLIBC__ -/* in case target doesn't use glibc */ +#ifndef HAVE_GMTIME +/* in case target doesn't have gmtime */ extern time_t gmtime(register struct tm *); -#endif +#endif /* ndef HAVE_GMTIME */ # ifdef __cplusplus } diff --git a/libgps.h b/libgps.h index 34c4a9d..00aeaa0 100644 --- a/libgps.h +++ b/libgps.h @@ -6,6 +6,8 @@ #ifndef _GPSD_LIBGPS_H_ #define _GPSD_LIBGPS_H_ +#include "gpsd_config.h" + /* values to poke in the gps_fd member if we get it via something special */ #define SHM_PSEUDO_FD -1 #define DBUS_PSEUDO_FD -2 @@ -36,9 +38,9 @@ extern int json_ais_read(const char *, char *, size_t, struct ais_t *, #define PRIVATE(gpsdata) ((struct privdata_t *)(gpsdata)->privdata) -#ifndef __GLIBC__ -/* in case target doesn't use glibc */ +#ifndef HAVE_GMTIME +/* in case target doesn't have gmtime */ extern time_t gmtime(register struct tm *); -#endif +#endif /* ndef HAVE_GMTIME */ #endif /* _GPSD_LIBGPS_H_ */