$NetBSD: patch-aa,v 1.3 2000/09/26 03:47:10 hubertf Exp $

--- sdbm.c.orig	Mon Sep 25 23:17:30 2000
+++ sdbm.c
@@ -25,6 +25,7 @@
 #endif
 #include <errno.h>
 #include <string.h>
+#include <stdlib.h>
 
 #ifdef __STDC__
 #include <stddef.h>
@@ -35,17 +36,6 @@
 #endif
 
 /*
- * externals
- */
-#ifndef sun
-extern int errno;
-#endif
-
-extern char *malloc proto((unsigned int));
-extern void free proto((void *));
-extern long lseek();
-
-/*
  * forward
  */
 static int getdbit proto((DBM *, long));
@@ -95,7 +85,7 @@
  */
 	n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;
 
-	if ((dirname = malloc((unsigned) n)) == NULL)
+	if ((dirname = (char *) malloc(n)) == NULL)
 		return errno = ENOMEM, (DBM *) NULL;
 /*
  * build the file names