]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
mingw: fix 'struct tm' compilation issue
authorVictor Julien <victor@inliniac.net>
Mon, 17 Jul 2017 14:19:32 +0000 (16:19 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 20 Dec 2017 15:23:31 +0000 (16:23 +0100)
src/util-time.c

index d6ba2f7ccda46593c7a31778d30164002a8e0b17..12d174f0f661f43aebb50608c709f8216ef345d6 100644 (file)
@@ -420,8 +420,10 @@ time_t SCMkTimeUtc (struct tm *tp)
     result += tp->tm_min;
     result *= 60;
     result += tp->tm_sec;
+#ifndef OS_WIN32
     if (tp->tm_gmtoff)
         result -= tp->tm_gmtoff;
+#endif
     return result;
 }
 
@@ -453,8 +455,10 @@ int SCStringPatternToTime (char *string, const char **patterns, int num_patterns
         tp->tm_hour = tp->tm_min = tp->tm_sec = 0;
         tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN;
         tp->tm_isdst = -1;
+#ifndef OS_WIN32
         tp->tm_gmtoff = 0;
         tp->tm_zone = NULL;
+#endif
         result = strptime(string, patterns[i], tp);
 
         if (result && *result == '\0')