Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makefs when building as a tool, only use struct tm ...



details:   https://anonhg.NetBSD.org/src/rev/000c44f26839
branches:  trunk
changeset: 789317:000c44f26839
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Aug 14 10:16:04 2013 +0000

description:
when building as a tool, only use struct tm tm_gmtoff if HAVE_STRUCT_TM_TM_GMTOFF is defined -- fixes cygwin build

diffstat:

 usr.sbin/makefs/udf.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 641b095fde53 -r 000c44f26839 usr.sbin/makefs/udf.c
--- a/usr.sbin/makefs/udf.c     Wed Aug 14 10:15:14 2013 +0000
+++ b/usr.sbin/makefs/udf.c     Wed Aug 14 10:16:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.c,v 1.12 2013/08/09 15:11:08 reinoud Exp $ */
+/* $NetBSD: udf.c,v 1.13 2013/08/14 10:16:04 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: udf.c,v 1.12 2013/08/09 15:11:08 reinoud Exp $");
+__RCSID("$NetBSD: udf.c,v 1.13 2013/08/14 10:16:04 jmcneill Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -53,6 +53,10 @@
 #include "udf/cdio_mmc_structs.h"
 #endif
 
+#if !HAVE_NBTOOL_CONFIG_H
+#define HAVE_STRUCT_TM_TM_GMTOFF
+#endif
+
 #include "makefs.h"
 #include "udf_create.h"
 #include "udf_write.h"
@@ -328,7 +332,11 @@
        /* use user's time zone as default */
        (void)time(&now);
        tm = localtime(&now);
+#ifdef HAVE_STRUCT_TM_TM_GMTOFF
        context.gmtoff = tm->tm_gmtoff;
+#else
+       context.gmtoff = 0;
+#endif
 
        /* return info */
        fsopts->fs_specific = NULL;



Home | Main Index | Thread Index | Old Index