mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 09:58:40 -07:00
ensure build is possible if TZ not defined
This commit is contained in:
parent
ab66a673a3
commit
a1990dc79e
@ -661,7 +661,10 @@ struct jparam {
|
||||
static JsonNode *line_to_location(char *line)
|
||||
{
|
||||
JsonNode *json, *o, *j;
|
||||
char *ghash, *tzname = NULL;
|
||||
char *ghash;
|
||||
#ifdef WITH_TZ
|
||||
char *tzname = NULL;
|
||||
#endif
|
||||
char tstamp[64], *bp;
|
||||
double lat, lon;
|
||||
long tst;
|
||||
@ -728,8 +731,10 @@ static JsonNode *line_to_location(char *line)
|
||||
*/
|
||||
|
||||
if ((j = json_find_member(o, "tzname")) != NULL) {
|
||||
#ifdef WITH_TZ
|
||||
tzname = j->string_;
|
||||
json_append_member(o, "isolocal", json_mkstring(isolocal(tst, tzname)));
|
||||
#endif
|
||||
} else {
|
||||
#ifdef WITH_TZ
|
||||
if (zdb) {
|
||||
|
Loading…
Reference in New Issue
Block a user