diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-10 21:17:00 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-10 21:17:00 +0000 |
commit | 8dcdfb3892ca09812246fea50ae56c2be2fbc154 (patch) | |
tree | 0c52b22a5b1c8f42de2137e6e300136297897d88 /libgo/configure.ac | |
parent | 053d0b42d353d5159a6ec8124dfb8856723e1e6d (diff) | |
download | gcc-8dcdfb3892ca09812246fea50ae56c2be2fbc154.tar.gz |
libgo: Use stat_atim.go on Solaris 12+
From Rainer Orth.
Solaris 12 changes the stat_[amc]tim members of struct stat from
timestruc_t to timespec_t for XPG7 compatiblity, thus breaking the libgo
build. The following patch checks for this change and uses the common
stat_atim.go if appropriate.
Reviewed-on: https://go-review.googlesource.com/14495
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/configure.ac')
-rw-r--r-- | libgo/configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/configure.ac b/libgo/configure.ac index 7c403a5d78c..a175d46220d 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -645,6 +645,12 @@ AC_CACHE_CHECK([epoll_event data.fd offset], STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_c_epoll_event_fd_offset} AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET) +dnl Check if <sys/stat.h> uses timespec_t for st_?tim members. Introduced +dnl in Solaris 12 for XPG7 compatibility. +AC_EGREP_HEADER([timespec_t.*st_atim], [sys/stat.h], + [have_stat_timespec=yes], [have_stat_timespec=no]) +AM_CONDITIONAL(HAVE_STAT_TIMESPEC, test $have_stat_timespec = yes) + dnl See if struct exception is defined in <math.h>. AC_CHECK_TYPE([struct exception], [libgo_has_struct_exception=yes], |