blob: 03e032dbb006acbad51ab8f35dc970b1e9310f22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$NetBSD: patch-ag,v 1.2 2012/11/01 19:27:36 joerg Exp $
--- xcalev/xcalev.c.orig 2012-10-30 21:25:09.000000000 +0000
+++ xcalev/xcalev.c
@@ -52,11 +52,13 @@ static char *copyright = "@(#)Copyrig
***/
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <pwd.h>
#include <unistd.h>
+#include <fcntl.h>
#if defined(NeXT)
#include <sys/fcntl.h>
#endif
@@ -88,8 +90,6 @@ static int year; /* year to do the wor
static char *memerr = "No more memory\n";
static char *usage = "Usage: xcalev [-f srcfile] [-d dir][-x][-r] [year]\n";
-char *malloc();
-
/*
* routines
*/
@@ -441,7 +441,7 @@ connect_file(filename, bytes)
if (statb.st_size == 0) {
*bytes = 0;
- return;
+ return NULL;
}
fibase = readbfile(fd, statb.st_size);
|