From b0549064c1456e322dcb008a55103a0cb81300f7 Mon Sep 17 00:00:00 2001 From: Christopher Covington Date: Fri, 7 Feb 2014 12:04:35 -0500 Subject: [PATCH] Make tpacket_req3 definition conditional The makefile includes need to be moved for everything to be defined properly when the configure tests run. The Ubuntu 12.04 x86_64 GCC and Linaro's 13.08 and newer AArch64 GCC's have the if_packet.h kernel header, but as of 13.12, the Linaro AArch32 GCC does not. Change-Id: I363c43fdb81b028f99aac77e15bff9462c87af4b Signed-off-by: Pavel Emelyanov --- Makefile | 5 ++--- include/sk-packet.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a4d560a90..fd8c29d1c 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,6 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR # #MAKEFLAGS := -r -R -include Makefile.inc -include Makefile.config - # # Common definitions # @@ -114,6 +111,8 @@ export CC MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS CRIU-SO export SRC_DIR SYSCALL-LIB SH RM ARCH_DIR OBJCOPY LDARCH LD export cflags-y +include Makefile.inc +include Makefile.config include scripts/Makefile.version include scripts/Makefile.rules diff --git a/include/sk-packet.h b/include/sk-packet.h index 4c740c0b9..607e7a912 100644 --- a/include/sk-packet.h +++ b/include/sk-packet.h @@ -22,7 +22,9 @@ extern int packet_receive_one(struct nlmsghdr *h, void *arg); #ifndef PACKET_FANOUT #define PACKET_FANOUT 18 +#endif +#ifndef TPACKET3_HDRLEN struct tpacket_req3 { unsigned int tp_block_size; unsigned int tp_block_nr;