Skip to content

Commit c9e3b5a

Browse files
cosmo0920edsiper
authored andcommitted
build: Add a detector for tm_zone member on tm struct
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent d8c949a commit c9e3b5a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,18 @@ if(FLB_HAVE_GMTOFF)
889889
FLB_DEFINITION(FLB_HAVE_GMTOFF)
890890
endif()
891891

892+
# tm_zone support
893+
check_c_source_compiles("
894+
#include <time.h>
895+
int main() {
896+
struct tm tm;
897+
tm.tm_zone = \"GMT\";
898+
return 0;
899+
}" FLB_HAVE_TIME_ZONE)
900+
if(FLB_HAVE_TIME_ZONE)
901+
FLB_DEFINITION(FLB_HAVE_TIME_ZONE)
902+
endif()
903+
892904
# clock_get_time() support for macOS.
893905
check_c_source_compiles("
894906
#include <mach/clock.h>

0 commit comments

Comments
 (0)