X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Ftimezone.cpp;h=7baf4943bec4b436c479d06d4394c9004f91f2d3;hp=873829d667111f86a3e96dbd164d89606f5183d1;hb=b4806214e905752617691f851717033fd3f266c2;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848 diff --git a/source/time/timezone.cpp b/source/time/timezone.cpp index 873829d..7baf494 100644 --- a/source/time/timezone.cpp +++ b/source/time/timezone.cpp @@ -2,13 +2,13 @@ #ifdef WIN32 #include #else +#include #include #endif #include #include #include "timestamp.h" #include "timezone.h" -#include "units.h" #include "utils.h" using namespace std; @@ -60,7 +60,7 @@ TimeZone get_local_timezone() long typecnt = get_long(ptr); long charcnt = get_long(ptr); int size = timecnt*5+typecnt*6+isgmtcnt+isstdcnt+leapcnt*8+charcnt; - char buf[size]; + char *buf = new char[size]; len = read(fd, buf, size); if(len==size) { @@ -90,6 +90,7 @@ TimeZone get_local_timezone() name = ptr+abbrind; } + delete[] buf; } close(fd);