From 9a8b21446ea9edf55272d5e048d97f1c94640e9e Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 18 Mar 2016 19:06:32 +0000 Subject: * configure.in (rb_cv_member_struct_tm_tm_gmtoff): For Linux (glibc) define _BSD_SOURCE for time.h to define struct tm.tm_gmtoff. * time.c: define _BSD_SOURCE at the top. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 2442e19d87..a96ed71344 100644 --- a/configure.in +++ b/configure.in @@ -2609,7 +2609,12 @@ if test "$use_setreuid" = yes; then fi AC_STRUCT_TIMEZONE AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff, - [AC_TRY_COMPILE([@%:@include ], + [AC_TRY_COMPILE([ + @%:@include +@%:@ifndef _BSD_SOURCE +@%:@define _BSD_SOURCE 1 +@%:@endif + ], [struct tm t; t.tm_gmtoff = 3600;], [rb_cv_member_struct_tm_tm_gmtoff=yes], [rb_cv_member_struct_tm_tm_gmtoff=no])]) -- cgit v1.2.3