From d4e385dd0e633525666bf95c56a2045bacc2a485 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 9 Jul 2013 20:16:40 +0200 Subject: configure: fix multiple issues in build configuration This patch is a bundle of multiple fixes. 1) Fix compilation of astraceroute when HAVE_LIBPCAP=1: astraceroute doesn't need libpcap, so add an additional guard/define to bpf.h and bpf_comp.c and netsniff-ng.c. Also since we generate a config.h file, we do not need to have this additional compile flag anymore. 2) Fix tstamping.{h,c} to use the configure script instead of the Makefile. For doing this, also fix the object inclusion in netsniff-ng/Makefile. Last but not least, rename __WITH_... into HAVE_... as this is more clean. Signed-off-by: Daniel Borkmann --- tstamping.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tstamping.h') diff --git a/tstamping.h b/tstamping.h index 41df9aa..ccc642e 100644 --- a/tstamping.h +++ b/tstamping.h @@ -1,6 +1,15 @@ #ifndef TSTAMPING_H #define TSTAMPING_H +#include "config.h" + +#ifdef HAVE_HARDWARE_TIMESTAMPING extern int set_sockopt_hwtimestamp(int sock, const char *dev); +#else +static inline int set_sockopt_hwtimestamp(int sock, const char *dev) +{ + return -1; +} +#endif #endif /* TSTAMPING_H */ -- cgit v1.2.3-54-g00ecf