diff --git a/configure.ac b/configure.ac index 51574e94..af061ae5 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. -AC_REVISION([$Id: configure.ac,v 1.43 2003/09/19 04:39:50 rocky Exp $])dnl +AC_REVISION([$Id: configure.ac,v 1.44 2003/09/21 07:43:39 rocky Exp $])dnl AC_INIT(lib/cdio.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(libcdio, 0.64-cvs) @@ -257,6 +257,12 @@ AC_SUBST(HAVE_DARWIN_CDROM) AC_CHECK_FUNCS( bzero memcpy ) +AC_CHECK_MEMBER([struct tm.tm_gmtoff], + [AC_DEFINE(HAVE_TM_GMTOFF, 1, + [Define if struct tm has the tm_gmtoff member.])], + , + [#include ]) + if test x$enable_cddb = x; then AC_ARG_ENABLE(cddb, [ --disable-cddb don't include CDDB lookups in cd_info], diff --git a/lib/iso9660.c b/lib/iso9660.c index 18cc4100..28140712 100644 --- a/lib/iso9660.c +++ b/lib/iso9660.c @@ -1,5 +1,5 @@ /* - $Id: iso9660.c,v 1.14 2003/09/21 01:14:30 rocky Exp $ + $Id: iso9660.c,v 1.15 2003/09/21 07:43:39 rocky Exp $ Copyright (C) 2000 Herbert Valerio Riedel Copyright (C) 2003 Rocky Bernstein @@ -37,7 +37,7 @@ #include #endif -static const char _rcsid[] = "$Id: iso9660.c,v 1.14 2003/09/21 01:14:30 rocky Exp $"; +static const char _rcsid[] = "$Id: iso9660.c,v 1.15 2003/09/21 07:43:39 rocky Exp $"; /* some parameters... */ #define SYSTEM_ID "CD-RTOS CD-BRIDGE" @@ -99,6 +99,7 @@ iso9660_set_dtime (const struct tm *tm, /*out*/ iso9660_dtime_t *idr_date) idr_date->dt_minute = tm->tm_min; idr_date->dt_second = tm->tm_sec; +#ifdef HAVE_TM_GMTOFF /* The ISO 9660 timezone is in the range -48..+52 and each unit represents a 15-minute interval. */ idr_date->dt_gmtoff = tm->tm_gmtoff / (15 * 60); @@ -115,6 +116,9 @@ iso9660_set_dtime (const struct tm *tm, /*out*/ iso9660_dtime_t *idr_date) idr_date->dt_gmtoff); idr_date->dt_gmtoff = 52; } +#else + idr_date->dt_gmtoff = 0; +#endif } /*!