summaryrefslogtreecommitdiff
path: root/tstamping.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-09 20:16:40 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-09 20:20:52 +0200
commitd4e385dd0e633525666bf95c56a2045bacc2a485 (patch)
treea87c451e7f988b65d5a3e350969ca765cff02add /tstamping.c
parentc07bdeb7419baf7f66e8de386744be9ec4891bb3 (diff)
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 <dborkman@redhat.com>
Diffstat (limited to 'tstamping.c')
-rw-r--r--tstamping.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tstamping.c b/tstamping.c
index 7c97850..860b7a0 100644
--- a/tstamping.c
+++ b/tstamping.c
@@ -4,14 +4,12 @@
#include <sys/socket.h>
#include <linux/sockios.h>
#include <linux/net_tstamp.h>
-#include <linux/net_tstamp.h>
#include <linux/if_packet.h>
#include <linux/if.h>
#include "str.h"
#include "tstamping.h"
-#ifdef __WITH_HARDWARE_TIMESTAMPING
int set_sockopt_hwtimestamp(int sock, const char *dev)
{
int timesource, ret;
@@ -38,9 +36,3 @@ int set_sockopt_hwtimestamp(int sock, const char *dev)
return setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, &timesource,
sizeof(timesource));
}
-#else
-int set_sockopt_hwtimestamp(int sock, const char *dev)
-{
- return -1;
-}
-#endif