summaryrefslogtreecommitdiff
path: root/devel/libtai/patches
diff options
context:
space:
mode:
Diffstat (limited to 'devel/libtai/patches')
-rw-r--r--devel/libtai/patches/patch-aa24
-rw-r--r--devel/libtai/patches/patch-trycpp_c12
-rw-r--r--devel/libtai/patches/patch-yearcal_c15
3 files changed, 47 insertions, 4 deletions
diff --git a/devel/libtai/patches/patch-aa b/devel/libtai/patches/patch-aa
index 5366dbf7c7f..db963f3af6e 100644
--- a/devel/libtai/patches/patch-aa
+++ b/devel/libtai/patches/patch-aa
@@ -1,12 +1,28 @@
-$NetBSD: patch-aa,v 1.1 2008/07/30 10:36:27 schmonz Exp $
+$NetBSD: patch-aa,v 1.2 2011/08/01 05:37:12 dholland Exp $
---- leapsecs_read.c.orig 1998-09-04 22:33:37.000000000 -0400
+Use malloc correctly.
+Don't declare own errno.
+Needs unistd.h.
+
+--- leapsecs_read.c.orig 1998-10-13 16:52:20.000000000 +0000
+++ leapsecs_read.c
-@@ -2,6 +2,7 @@
+@@ -2,7 +2,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+-extern int errno;
++#include <stdlib.h>
+#include <unistd.h>
- extern int errno;
++
#include "tai.h"
#include "leapsecs.h"
+
+@@ -29,7 +31,7 @@ int leapsecs_read()
+
+ if (fstat(fd,&st) == -1) { close(fd); return -1; }
+
+- t = (struct tai *) malloc(st.st_size);
++ t = malloc(st.st_size);
+ if (!t) { close(fd); return -1; }
+
+ n = read(fd,(char *) t,st.st_size);
diff --git a/devel/libtai/patches/patch-trycpp_c b/devel/libtai/patches/patch-trycpp_c
new file mode 100644
index 00000000000..3c5d5ed972d
--- /dev/null
+++ b/devel/libtai/patches/patch-trycpp_c
@@ -0,0 +1,12 @@
+$NetBSD: patch-trycpp_c,v 1.1 2011/08/01 05:37:12 dholland Exp $
+
+Fix illegal C.
+
+--- trycpp.c~ 1998-10-13 16:52:20.000000000 +0000
++++ trycpp.c
+@@ -1,4 +1,4 @@
+-void main()
++int main()
+ {
+ #ifdef NeXT
+ printf("nextstep\n"); exit(0);
diff --git a/devel/libtai/patches/patch-yearcal_c b/devel/libtai/patches/patch-yearcal_c
new file mode 100644
index 00000000000..984308c9b49
--- /dev/null
+++ b/devel/libtai/patches/patch-yearcal_c
@@ -0,0 +1,15 @@
+$NetBSD: patch-yearcal_c,v 1.1 2011/08/01 05:37:12 dholland Exp $
+
+Fix illegal C.
+
+--- yearcal.c~ 1998-10-13 16:52:20.000000000 +0000
++++ yearcal.c
+@@ -16,7 +16,7 @@ char *montab[] = {
+ , "December"
+ } ;
+
+-void main(argc,argv)
++int main(argc,argv)
+ int argc;
+ char **argv;
+ {