Blame view

buildroot/buildroot-2016.08.1/package/iproute2/0004-iproute-no-iptables.patch 1.18 KB
6b13f685e   김민수   BSP 최초 추가
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
  Fix build issues when there's no iptables present.
  
  Patch from Matt Whitlock
  See https://bugs.gentoo.org/show_bug.cgi?id=577464
  Status: in theory submitted upstream by Lars Wendler.
  
  --- iproute2-4.5.0/configure~	2016-03-14 23:02:31.000000000 +0000
  +++ iproute2-4.5.0/configure	2016-03-17 13:24:17.634743197 +0000
  @@ -169,10 +169,25 @@
   
   check_ipt()
   {
  -	if ! grep TC_CONFIG_XT Config > /dev/null
  +	if grep -q TC_CONFIG_XT Config
   	then
  +		return
  +	fi
  +
  +	cat >$TMPDIR/ipttest.c <<EOF
  +#include <iptables.h>
  +int main() { return 0; }
  +EOF
  +
  +	if $CC -std=c90 -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL \
  +		$(${PKG_CONFIG} libiptc --cflags --libs 2>/dev/null) -ldl >/dev/null 2>&1
  +	then
  +		echo "TC_CONFIG_IPT:=y" >>Config
   		echo "using iptables"
  +	else
  +		echo "no"
   	fi
  +	rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest
   }
   
   check_ipt_lib_dir()
  --- iproute2-4.5.0/tc/Makefile~	2016-03-14 23:02:31.000000000 +0000
  +++ iproute2-4.5.0/tc/Makefile	2016-03-17 13:18:18.686689985 +0000
  @@ -88,7 +88,9 @@
   	CFLAGS += -DTC_CONFIG_XT_H
   	TCSO += m_xt_old.so
       else
  -      TCMODULES += m_ipt.o
  +      ifeq ($(TC_CONFIG_IPT),y)
  +        TCMODULES += m_ipt.o
  +      endif
       endif
     endif
   endif