$OpenBSD: patch-configure,v 1.6 2014/10/27 09:07:07 landry Exp $
no Werror, breaks with gcrypt deprecation warnings
dont check for pcap-bpf.h, not installed on openbsd
need to include sys/param.h and unistd.h to properly reach swapctl() prototype
https://github.com/collectd/collectd/pull/779
--- configure.orig	Sun Jan 26 09:10:00 2014
+++ configure	Fri Oct 24 10:41:43 2014
@@ -12793,7 +12793,7 @@ eval "LTDLOPEN=\"$libname_spec\""
 
 
 
-$as_echo "#define LIBTOOL_VERSION 2" >>confdefs.h
+$as_echo "#define LIBTOOL_VERSION 1" >>confdefs.h
 
 
 
@@ -16812,7 +16812,7 @@ SAVE_CFLAGS="$CFLAGS"
 # Emulate behavior of src/Makefile.am
 if test "x$GCC" = "xyes"
 then
-	CFLAGS="$CFLAGS -Wall -Werror"
+	CFLAGS="$CFLAGS -Wall"
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtok_r" >&5
@@ -17524,8 +17524,11 @@ else
 #  undef _LARGEFILE64_SOURCE
 #endif
 #include <sys/stat.h>
+#include <sys/param.h>
 #include <sys/swap.h>
+#include <unistd.h>
 
+
 int
 main ()
 {
@@ -17561,7 +17564,9 @@ else
 #  undef _LARGEFILE64_SOURCE
 #endif
 #include <sys/stat.h>
+#include <sys/param.h>
 #include <sys/swap.h>
+#include <unistd.h>
 
 int
 main ()
@@ -18562,16 +18567,16 @@ else
 fi
 
 
-ac_fn_c_check_member "$LINENO" "struct kinfo_proc" "kp_proc" "ac_cv_member_struct_kinfo_proc_kp_proc" "
+ac_fn_c_check_member "$LINENO" "struct kinfo_proc" "p_pid" "ac_cv_member_struct_kinfo_proc_p_pid" "
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #include <kvm.h>
 
 "
-if test "x$ac_cv_member_struct_kinfo_proc_kp_proc" = xyes; then :
+if test "x$ac_cv_member_struct_kinfo_proc_p_pid" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_KINFO_PROC_KP_PROC 1
+#define HAVE_STRUCT_KINFO_PROC_P_PID 1
 _ACEOF
 
 
@@ -18585,16 +18590,16 @@ else
 		have_struct_kinfo_proc_openbsd="no"
 
 fi
-ac_fn_c_check_member "$LINENO" "struct kinfo_proc" "kp_eproc" "ac_cv_member_struct_kinfo_proc_kp_eproc" "
+ac_fn_c_check_member "$LINENO" "struct kinfo_proc" "p_ppid" "ac_cv_member_struct_kinfo_proc_p_ppid" "
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #include <kvm.h>
 
 "
-if test "x$ac_cv_member_struct_kinfo_proc_kp_eproc" = xyes; then :
+if test "x$ac_cv_member_struct_kinfo_proc_p_ppid" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_KINFO_PROC_KP_EPROC 1
+#define HAVE_STRUCT_KINFO_PROC_P_PPID 1
 _ACEOF
 
 
@@ -22812,23 +22817,7 @@ fi
 done
 
 fi
-if test "x$with_libpcap" = "xyes"
-then
-	for ac_header in pcap-bpf.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "pcap-bpf.h" "ac_cv_header_pcap_bpf_h" "$ac_includes_default"
-if test "x$ac_cv_header_pcap_bpf_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_BPF_H 1
-_ACEOF
 
-else
-  with_libpcap="no (pcap-bpf.h not found)"
-fi
-
-done
-
-fi
 if test "x$with_libpcap" = "xyes"
 then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libpcap has PCAP_ERROR_IFACE_NOT_UP" >&5
@@ -23057,7 +23046,7 @@ then
 	SAVE_LDFLAGS="$LDFLAGS"
 	# trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
 	# (see issues #41 and #42)
-	CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
+	CFLAGS="$CFLAGS $PERL_CFLAGS -Wall"
 	LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken Perl_load_module()" >&5
@@ -26629,7 +26618,7 @@ then
 	plugin_processes="yes"
 fi
 
-if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
+if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_openbsd" = "xyes"
 then
 	plugin_processes="yes"
 fi
