summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.in7
-rw-r--r--time.c1
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b404c82d18..e91aaf7684 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Apr 28 01:11:14 2016 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * time.c: define _DEFAULT_SOURCE because glibc 2.20 depracates
+ _BSD_SOURCE.
+ https://sourceware.org/glibc/wiki/Release/2.20
+
Thu Apr 28 00:27:55 2016 Tanaka Akira <akr@fsij.org>
* numeric.c (int_xor): {Fixnum,Bignum}#^ is unified into
diff --git a/configure.in b/configure.in
index feb1fffa8f..292e40ce1a 100644
--- a/configure.in
+++ b/configure.in
@@ -2649,10 +2649,9 @@ fi
AC_STRUCT_TIMEZONE
AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff,
[AC_TRY_COMPILE([
- @%:@include <time.h>
-@%:@ifndef _BSD_SOURCE
-@%:@define _BSD_SOURCE 1
-@%:@endif
+@%:@define _BSD_SOURCE
+@%:@define _DEFAULT_SOURCE
+@%:@include <time.h>
],
[struct tm t; t.tm_gmtoff = 3600;],
[rb_cv_member_struct_tm_tm_gmtoff=yes],
diff --git a/time.c b/time.c
index 336d7c26a8..9f009b5a15 100644
--- a/time.c
+++ b/time.c
@@ -9,6 +9,7 @@
**********************************************************************/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "internal.h"
#include <sys/types.h>