Fix compilation on GCC
This commit is contained in:
parent
8635127ec3
commit
825875e039
|
@ -23,7 +23,7 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug|RelWithDebInfo")
|
|||
endif()
|
||||
|
||||
# https://t.me/NightShadowsHangout/670691
|
||||
list(APPEND FLAGS -Werror -Wall -Wextra -Wshadow -Wpedantic -Wno-gnu-anonymous-struct -fPIC -fno-rtti -Wconversion -Wno-unused-parameter -Wimplicit-fallthrough)
|
||||
list(APPEND FLAGS -Werror -Wall -Wextra -Wshadow -Wpedantic -Wno-gnu-anonymous-struct -Wno-missing-field-initializers -fPIC -fno-rtti -Wconversion -Wno-unused-parameter -Wimplicit-fallthrough)
|
||||
|
||||
# i have no idea why this hack wasn't needed before but it's needed if sanitizers are used
|
||||
add_link_options(${FLAGS})
|
||||
|
|
|
@ -205,12 +205,8 @@ time_t parse_rfc3339(const std::string& str) {
|
|||
.tm_mday = to_int(sm.str(3)),
|
||||
.tm_mon = to_int(sm.str(2)) - 1,
|
||||
.tm_year = to_int(sm.str(1)) - 1900,
|
||||
.tm_wday = -1,
|
||||
.tm_yday = -1,
|
||||
|
||||
.tm_isdst = -1,
|
||||
.tm_gmtoff = !sm.str(7).empty() ? 0 : to_int(sm.str(8)) * 60 * 60 + to_int(sm.str(9)) * 60,
|
||||
.tm_zone = nullptr,
|
||||
};
|
||||
time_t time = mktime(&tm);
|
||||
if (time == -1) {
|
||||
|
|
Loading…
Reference in New Issue