summaryrefslogtreecommitdiff
path: root/net/freeradius/patches/patch-ai
blob: 8fac71e84066f62844888e308636f597fdc48d69 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
$NetBSD: patch-ai,v 1.13 2018/04/12 01:21:07 nonaka Exp $

Portable test syntax

--- configure.orig	2017-07-17 12:43:00.000000000 +0000
+++ configure
@@ -10133,7 +10133,49 @@ $as_echo "no" >&6; }
     eval "ac_cv_type_${ac_safe_type}_has_ipi_addr="
  fi
 
-if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_spec_dst in struct in_pktinfo" >&5
+$as_echo_n "checking for ipi_spec_dst in struct in_pktinfo... " >&6; }
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <netinet/in.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
+#endif
+
+int
+main ()
+{
+ int foo = offsetof(struct in_pktinfo, ipi_spec_dst)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  has_element=" "
+else
+  has_element=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+  ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'`
+  if test "x$has_element" != "x"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    eval "ac_cv_type_${ac_safe_type}_has_ipi_spec_dst=yes"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    eval "ac_cv_type_${ac_safe_type}_has_ipi_spec_dst="
+ fi
+
+if test "$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "yes" && test "$ac_cv_type_struct_in_pktinfo_has_ipi_spec_dst" = "yes"; then
 
 $as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h