1 $NetBSD: patch-ab,v 1.5 2009/04/25 23:46:47 gdt Exp $
3 --- bsd.c.orig 1993-05-01 06:21:53.000000000 +0200
5 @@ -69,8 +69,12 @@ ZOOFILE f;
8 /* Function gettz() returns the offset from GMT in seconds */
13 +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
14 + return -localtime(&t)->tm_gmtoff;
16 #define SEC_IN_DAY (24L * 60L * 60L)
17 #define INV_VALUE (SEC_IN_DAY + 1L)
18 static long retval = INV_VALUE; /* cache, init to impossible value */
19 @@ -95,6 +99,7 @@ long gettz()
20 retval = -tm->tm_gmtoff;
26 /* Standard UNIX-compatible time routines */
27 @@ -103,15 +108,19 @@ long gettz()
28 /* Standard UNIX-specific file attribute routines */
31 +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
39 /* Truncate a file. */
40 int zootrunc(f) FILE *f;
42 - extern long lseek();
44 + extern off_t lseek();
47 seekpos = lseek(fd, 0L, SEEK_CUR);