aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/net-snmp-devel/files/patch-configure.in
blob: d2550644fed6bd60ca83a71f4d230e8064ef8b2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- configure.in.orig   Fri Jul 14 06:55:27 2006
+++ configure.in    Tue Feb 27 20:29:49 2007
@@ -2171,7 +2171,7 @@
   # fall back
   CFLAG="-f"
 fi
-for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel /dev/null
   do
   if test -f $i -o $CFLAG $i; then
     ac_cv_KERNEL_LOC="$i"
@@ -3145,6 +3145,26 @@
 # checking for 4.3 vs 4.4 rtentry.
 AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
 [
+
+dnl 4.4 compatible but renamed on FreeBSD
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#define KERNEL
+#define _KERNEL
+#include <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#include <net/route.h>
+],[
+
+#ifndef STRUCT_RTENTRY_HAS_RT_DST
+#define rt_dst rt_nodes->rn_key
+#endif
+
+  struct rtentry rt; 
+  rt.rt_nodes[0].rn_bit = 1;
+  rt.rt_dst;
+  ], ac_cv_RTENTRY_TYPE="BSD-4.4")
 
 # 4.4 compat
 AC_TRY_COMPILE([