]> granicus.if.org Git - jq/commitdiff
Fix HAVE_TM_TM_GMT_OFF usage
authorNicolas Williams <nico@cryptonector.com>
Sun, 21 May 2017 06:53:00 +0000 (01:53 -0500)
committerNicolas Williams <nico@cryptonector.com>
Sun, 21 May 2017 06:53:00 +0000 (01:53 -0500)
src/builtin.c

index cfdd4fef6fad792185a297f369ea15c4c028a8b3..e785944c0da121d0d39c4ba941ec6c447ef452b1 100644 (file)
@@ -1201,9 +1201,9 @@ static time_t my_mktime(struct tm *tm) {
   if (t == (time_t)-1)
     return t;
 #ifdef HAVE_TM_TM_GMT_OFF
-  return t + tm.tm_gmtoff;
-#elif defined(HAVE_TM_TM_GMT_OFF)
-  return t + tm.__tm_gmtoff;
+  return t + tm->tm_gmtoff;
+#elif HAVE_TM___TM_GMT_OFF
+  return t + tm->__tm_gmtoff;
 #else
   return (time_t)-2; /* Not supported */
 #endif