$OpenBSD: patch-cfs_c,v 1.2 2004/06/15 18:32:22 sturm Exp $
--- cfs.c.orig	2004-06-09 15:02:19.000000000 +0200
+++ cfs.c	2004-06-09 15:07:44.000000000 +0200
@@ -43,7 +43,7 @@
 
 struct in_addr validhost;
 
-#if defined(SOLARIS2X) || defined(__NetBSD__)
+#if defined(SOLARIS2X) || defined(__OpenBSD__) || defined(__NetBSD__)
 void nfs_program_2();
 void adm_program_2();
 #include <string.h>
@@ -51,8 +51,9 @@ void adm_program_2();
 int nfs_program_2();
 int adm_program_2();
 #endif
-#ifdef __NetBSD__
+#if defined(__OpenBSD__) || defined(__NetBSD__)
 int _rpcsvcdirty;
+int _rpcpmstart;
 #endif
 
 #ifdef	DEBUG
@@ -208,7 +209,7 @@ main(argc,argv)
 			perror("cfsd: fork\n");
 			exit(1);
 		}
-		fprintf(stderr,"cfs ready\n",pid);
+		fprintf(stderr,"cfs ready\n");
 		printf("%d\n",pid);
 		exit(0);
 	}
@@ -240,12 +241,12 @@ initstuff()
  	setuid(0);
 	umask(0);
 
-#if defined(__NetBSD__) || defined(__bsdi__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)
 #ifndef DEBUG
 	/* detach from terminal */
 	daemon(0,0);
 #endif /* DEBUG */
-#endif /* __NetBSD__ */
+#endif /* __*BSD__ */
 
 #ifndef NORLIMITS
 	/* try to make sure we don't spill a corefile */
