Commit 2b17cc4f authored by Phil Blundell's avatar Phil Blundell

Provide local definition of IPPROTO_GRE to allow iptunnel

to build under glibc 2.0.
Make it configurable whether iptunnel & ipmaddr are built,
with the default being off.  This seems to be necessary since
making them work with 2.0 looks hard.  Does it sound
reasonable?
parent 8a56dfdc
......@@ -76,7 +76,12 @@
NET_LIB_PATH = lib
NET_LIB_NAME = net-tools
PROGS = ifconfig hostname arp netstat route rarp slattach plipconfig iptunnel ipmaddr
PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig
-include config.make
ifeq ($(HAVE_IP_TOOLS),1)
PROGS += iptunnel ipmaddr
endif
# Compiler and Linker Options
# You may need to uncomment and edit these if you are using libc5 and IPv6.
......
......@@ -64,7 +64,8 @@ Notable changes since 1.45 include:
- Various bugs have been fixed.
You need kernel 2.0 or later to use these programs. These programs
should compile cleanly with either glibc or libc5.
should compile cleanly with either glibc or libc5. The `iptunnel' and
`ipmaddr' programs require kernel 2.1 or later.
The NLS support was changed from catgets to GNU gettext by Arnaldo
Carvalho de Melo <acme@conectiva.com.br> in June, 1998, to make the
......
......@@ -83,3 +83,4 @@ bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n
* Other Features.
*
bool 'IP Masquerading support' HAVE_FW_MASQUERADE n
bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS n
......@@ -34,6 +34,7 @@
#
CONFIG=config.h
MAKECONFIG=config.make
[ -z "$BASH" ] && { echo "Configure requires bash" 1>&2; exit 1; }
......@@ -69,8 +70,10 @@ function bool()
done
if [ "$ans" = "y" ]; then
echo "#define $2 1" >>${CONFIG}
echo "$2=1" >>${MAKECONFIG}
else
echo "#define $2 0" >>${CONFIG}
echo "# $2=0" >> ${MAKECONFIG}
fi
raw_input_line="bool '$1' $2 $ans"
eval "$2=$ans"
......@@ -99,6 +102,7 @@ function int()
#
> config.new
> ${CONFIG}
> ${MAKECONFIG}
stack=''
branch='t'
......
......@@ -47,6 +47,11 @@
#undef GRE_VERSION
#define GRE_VERSION htons(0x0007)
/* Old versions of glibc do not define this */
#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
#define IPPROTO_GRE 47
#endif
#include "utils.h"
static void usage(void) __attribute__((noreturn));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment