Description: tm_gmtoff may be missed Index: knot/configure.ac =================================================================== --- knot.orig/configure.ac 2014-05-24 14:03:58.107975376 +0400 +++ knot/configure.ac 2014-05-24 14:45:02.032197698 +0400 @@ -324,6 +324,8 @@ AC_TYPE_SIZE_T AC_TYPE_SSIZE_T +AC_CHECK_MEMBERS([struct tm.tm_gmtoff], [], [], [#include ]) + # Checks for library functions. AC_CHECK_FUNCS([clock_gettime gettimeofday fgetln getline madvise malloc_trim poll posix_memalign pselect pthread_setaffinity_np regcomp select setgroups initgroups]) Index: knot/src/common/log.c =================================================================== --- knot.orig/src/common/log.c 2014-05-24 14:03:58.202982325 +0400 +++ knot/src/common/log.c 2014-05-24 15:03:02.507965836 +0400 @@ -216,7 +216,9 @@ struct timeval tv; gettimeofday(&tv, NULL); time_t sec = tv.tv_sec; - if (localtime_r(&sec, <) != NULL) { + struct tm *r = localtime_r(&sec, <); +#ifdef HAVE_STRUCT_TM_TM_GMTOFF + if (r) { bool precise = false; #ifdef ENABLE_MICROSECONDS_LOG @@ -234,6 +236,7 @@ (unsigned int)(lt.tm_gmtoff / 60) % 60); } } +#endif /* HAVE_STRUCT_TM_TM_GMTOFF */ // Log streams for (int i = LOGT_STDERR; i < LOGT_FILE + LOG_FDS_OPEN; ++i) {