File:  [cvs.NetBSD.org] / pkgsrc / geography / libnova / patches / patch-src_julian__day.c
Revision 1.1: download - view: text, annotated - select for diffs
Mon Jun 10 10:50:32 2024 UTC (8 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2024Q4-base, pkgsrc-2024Q4, pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, HEAD
libnova: Fix build on SunOS.

$NetBSD: patch-src_julian__day.c,v 1.1 2024/06/10 10:50:32 jperkin Exp $

SunOS does not have gmtoff.

--- src/julian_day.c.orig	2024-06-10 10:48:17.096625904 +0000
+++ src/julian_day.c
@@ -298,7 +298,11 @@ void ln_get_local_date (double JD, struc
 #else
  	curtime = time (NULL);
  	loctime = localtime(&curtime);
+#ifdef __sun
+ 	gmtoff = 0;
+#else
  	gmtoff = loctime->tm_gmtoff;
+#endif
 	// otherwise there is no reasonable way how to get that:(
 	// tm_gmtoff already included DST
 #endif

CVSweb <webmaster@jp.NetBSD.org>