Module Name: src
Committed By: jmcneill
Date: Wed Aug 14 10:16:04 UTC 2013
Modified Files:
src/usr.sbin/makefs: udf.c
Log Message:
when building as a tool, only use struct tm tm_gmtoff if
HAVE_STRUCT_TM_TM_GMTOFF is defined -- fixes cygwin build
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/makefs/udf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makefs/udf.c
diff -u src/usr.sbin/makefs/udf.c:1.12 src/usr.sbin/makefs/udf.c:1.13
--- src/usr.sbin/makefs/udf.c:1.12 Fri Aug 9 15:11:08 2013
+++ src/usr.sbin/makefs/udf.c Wed Aug 14 10:16:04 2013
@@ -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 @@ __RCSID("$NetBSD: udf.c,v 1.12 2013/08/0
#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 @@ udf_prep_opts(fsinfo_t *fsopts)
/* 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;