]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
YaHTTP upgrade from upstream 1569/head
authorAki Tuomi <cmouse@cmouse.fi>
Fri, 18 Jul 2014 05:50:58 +0000 (08:50 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Fri, 18 Jul 2014 05:50:58 +0000 (08:50 +0300)
pdns/ext/yahttp/yahttp/utility.hpp

index 0242fbb8fb001cb2e16bb0a23c064d77ab79279f..dcd52077d9ee5eb2c0b689677c1808eda29fc4a0 100644 (file)
@@ -49,18 +49,16 @@ namespace YaHTTP {
        struct tm *tm;
        tm = localtime(&t);
        fromTm(tm);
-# ifndef HAVE_TM_GMTOFF
+#endif
+#ifndef HAVE_TM_GMTOFF
        time_t t2;
-#  ifdef HAVE_LOCALTIME_R
+# ifdef HAVE_LOCALTIME_R
        gmtime_r(&t, &tm);
        t2 = mktime(&tm);
-#  else
+# else
        tm = gmtime(&t);
        t2 = mktime(tm);
-#  endif
 # endif
-#endif
-#ifndef HAVE_TM_GMTOFF
        this->utc_offset = ((t2-t)/10)*10; // removes any possible differences. 
 #endif
      }; //<! uses localtime for time