$OpenBSD: patch-configure_in,v 1.34 2011/09/05 07:11:23 giovanni Exp $
--- configure.in.orig	Fri Jul  1 11:22:18 2011
+++ configure.in	Thu Aug 25 21:46:08 2011
@@ -464,44 +464,7 @@ AC_SUBST(ABI_CHECK)
 AC_PATH_PROG(PS, ps, ps)
 AC_MSG_CHECKING("how to check if pid exists")
 PS=$ac_cv_path_PS
-# Linux style
-if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
-then
-  FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
-# Solaris
-elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null
-then
-  FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
-# BSD style
-elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null
-then
-  FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
-# SysV style
-elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null
-then
-  FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
-# Do anybody use this?
-elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null
-then
-  FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
-else
-  case $SYSTEM_TYPE in
-    *freebsd*|*dragonfly*)
-      FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
-      ;;
-    *darwin*)
-      FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
-      ;;
-    *cygwin*)
-      FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
-      ;;
-    *netware*)
-      FIND_PROC=
-      ;;
-    *)
-      AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this?  See the Installation chapter in the Reference Manual.])
-  esac
-fi
+FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
 AC_SUBST(FIND_PROC)
 AC_MSG_RESULT("$FIND_PROC")
 
@@ -888,7 +851,8 @@ AC_ARG_WITH(libwrap,
     AC_CHECK_HEADER(tcpd.h,
       LIBS="-lwrap $LIBS"
       AC_MSG_CHECKING(for TCP wrappers library -lwrap)
-      AC_TRY_LINK([#include <tcpd.h>
+      AC_TRY_LINK([#include <stdio.h>
+#include <tcpd.h>
 int allow_severity = 0;
 int deny_severity  = 0;
 
