From: Ted Lemon Date: Tue, 10 Oct 2000 22:34:39 +0000 (+0000) Subject: Don't compile in Token Ring support if it's not supported. X-Git-Tag: V3-BETA-2-PATCH-7~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e31656de632f7bd2fe3dbbf82439c1753e9309bc;p=thirdparty%2Fdhcp.git Don't compile in Token Ring support if it's not supported. --- diff --git a/common/lpf.c b/common/lpf.c index ebafb5920..a75c56ce4 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -37,7 +37,7 @@ #ifndef lint static char copyright[] = -"$Id: lpf.c,v 1.27 2000/09/01 23:03:35 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: lpf.c,v 1.28 2000/10/10 22:34:39 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -170,11 +170,14 @@ void if_deregister_send (info) in bpf includes... */ extern struct sock_filter dhcp_bpf_filter []; extern int dhcp_bpf_filter_len; + +#if defined (HAVE_TR_SUPPORT) extern struct sock_filter dhcp_bpf_tr_filter []; extern int dhcp_bpf_tr_filter_len; +static void lpf_tr_filter_setup (struct interface_info *); +#endif static void lpf_gen_filter_setup (struct interface_info *); -static void lpf_tr_filter_setup (struct interface_info *); void if_register_receive (info) struct interface_info *info; @@ -182,9 +185,11 @@ void if_register_receive (info) /* Open a LPF device and hang it on this interface... */ info -> rfdesc = if_register_lpf (info); +#if defined (HAVE_TR_SUPPORT) if (info -> hw_address.hbuf [0] == HTYPE_IEEE802) lpf_tr_filter_setup (info); else +#endif lpf_gen_filter_setup (info); if (!quiet_interface_discovery) @@ -247,6 +252,7 @@ static void lpf_gen_filter_setup (info) } } +#if defined (HAVE_TR_SUPPORT) static void lpf_tr_filter_setup (info) struct interface_info *info; { @@ -279,6 +285,7 @@ static void lpf_tr_filter_setup (info) log_fatal ("Can't install packet filter program: %m"); } } +#endif /* HAVE_TR_SUPPORT */ #endif /* USE_LPF_RECEIVE */ #ifdef USE_LPF_SEND