$OpenBSD: patch-client_flushroute_c,v 1.1 2013/05/10 09:56:45 sthen Exp $
--- client/flushroute.c.orig	Tue Apr 14 12:14:33 1998
+++ client/flushroute.c	Fri May 10 10:49:49 2013
@@ -34,9 +34,9 @@
  * SUCH DAMAGE.
  */
 
-#if defined(__bsdi__) || (__FreeBSD__ >= 2)
+#if defined(__bsdi__) || (__FreeBSD__ >= 2) || defined(__OpenBSD__)
 
-/* It's BSD/OS or FreeBSD 2.x */
+/* It's BSD/OS, FreeBSD 2.x or OpenBSD */
 
 /*
  * Modified by tomy@sfc.wide.ad.jp
@@ -75,7 +75,7 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
+#if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)route.c	8.3 (Berkeley) 3/19/94";
 #endif /* not lint */
 
@@ -240,7 +240,7 @@ flushroutes(ifname)
   return(0);
 }
 
-#else /* __bsdi__ or FreeBSD 2.x */
+#else /* __bsdi__, FreeBSD 2.x or OpenBSD */
 
 #include <stdio.h>
 #include <nlist.h>
@@ -294,21 +294,42 @@ flushroutes(dummy)
     nlist("/vmunix", nl);
   }
   if (nl[N_RTHOST].n_value == 0) {
+#ifndef __OpenBSD__
     syslog(LOG_LOCAL0|LOG_ERR, "\"rthost\", symbol not in namelist");
+#else
+    /* Using LOG_LOCAL1 to avoid OpenBSD ipmon log conflict */
+    syslog(LOG_LOCAL1|LOG_ERR, "\"rthost\", symbol not in namelist");
+#endif
     exit(1);
   }
   if (nl[N_RTNET].n_value == 0) {
+#ifndef __OpenBSD__
     syslog(LOG_LOCAL0|LOG_ERR, "\"rtnet\", symbol not in namelist");
+#else
+    /* Using LOG_LOCAL1 to avoid OpenBSD ipmon log conflict */
+    syslog(LOG_LOCAL1|LOG_ERR, "\"rtnet\", symbol not in namelist");
+#endif
     exit(1);
   }
   if (nl[N_RTHASHSIZE].n_value == 0) {
+#ifndef __OpenBSD__
     syslog(LOG_LOCAL0|LOG_ERR,
 	   "\"rthashsize\", symbol not in namelist");
+#else
+    /* Using LOG_LOCAL1 to avoid OpenBSD ipmon log conflict */
+    syslog(LOG_LOCAL1|LOG_ERR,
+	   "\"rthashsize\", symbol not in namelist");
+#endif
     exit(1);
   }
   kmem = open("/dev/kmem", 0);
   if (kmem < 0) {
+#ifndef __OpenBSD__
     syslog(LOG_LOCAL0|LOG_ERR, "/dev/kmem: %m");
+#else
+    /* Using LOG_LOCAL1 to avoid OpenBSD ipmon log conflict */
+    syslog(LOG_LOCAL1|LOG_ERR, "/dev/kmem: %m");
+#endif
     exit(1);
   }
   lseek(kmem, nl[N_RTHASHSIZE].n_value, 0);
@@ -345,4 +366,4 @@ again:
   return(0);
 }
 
-#endif /* __bsdi__ or FreeBSD 2.x */
+#endif /* __bsdi__, FreeBSD 2.x or OpenBSD */
