pkgsrc/devel/scmcvs/patches/patch-lib_mktime.c
asau 668b04eac3 Don't build bundled implementation of "mktime" on NetBSD.
This makes the package build on 32-bit NetBSD.
Patch is taken from devel/blame that carries the same "mktime" implementation.
2014-06-26 22:46:56 +00:00

28 lines
672 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$NetBSD: patch-lib_mktime.c,v 1.1 2014/06/26 22:46:57 asau Exp $
This code is broken and uncompilable on 32-bit NetBSD.
The problem is the same as reported here:
http://sourceware.org/bugzilla/show_bug.cgi?id=12401
The path of least resistance is just to skip the entire file on
NetBSD, as there is a perfectly good mktime() in libc.
--- lib/mktime.c.orig 2005-09-19 16:16:56.000000000 +0000
+++ lib/mktime.c
@@ -21,6 +21,8 @@
mktime. */
/* #define DEBUG 1 */
+#ifndef __NetBSD__
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -656,6 +658,7 @@ main (int argc, char **argv)
}
#endif /* DEBUG */
+#endif /* __NetBSD__ */
/*
Local Variables: