$NetBSD: patch-ab,v 1.2 2024/04/29 10:11:14 nia Exp $

--- portmap.c.orig	1996-05-31 13:52:59.000000000 +0000
+++ portmap.c
@@ -85,6 +85,8 @@ static char sccsid[] = "@(#)portmap.c 1.
 #include <stdio.h>
 #include <syslog.h>
 #include <netdb.h>
+#include <errno.h>
+#include <unistd.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <sys/wait.h>
@@ -124,7 +126,6 @@ void reap();
 static void callit();
 struct pmaplist *pmaplist;
 int debugging = 0;
-extern int errno;
 
 #include "pmap_check.h"
 
@@ -235,7 +236,7 @@ main(argc, argv)
 /* need to override perror calls in rpc library */
 void
 perror(what)
-	const char *what;
+	__const char *what;
 {
 
 	syslog(LOG_ERR, "%s: %m", what);
