mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 12:57:57 +00:00
zdtm: fix struct tpacket_req3 redeclaration
Linux has it since v3.2 cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -I../../lib packet_sock.c ../../lib/libzdtmtst.a -o packet_sock packet_sock.c:70:8: error: redefinition of ‘struct tpacket_req3’ In file included from packet_sock.c:23:0: /usr/include/linux/if_packet.h:245:8: note: originally defined here Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
cfa2150490
commit
fd735d8be3
@ -20,6 +20,7 @@ const char *test_author = "Pavel Emelyanov <xemul@parallels.com>";
|
||||
#include <stdlib.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/if_packet.h>
|
||||
#include <net/ethernet.h>
|
||||
|
||||
@ -67,6 +68,8 @@ struct packet_mreq_max {
|
||||
|
||||
#define LO_ADDR_LEN 6
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
|
||||
|
||||
struct tpacket_req3 {
|
||||
unsigned int tp_block_size;
|
||||
unsigned int tp_block_nr;
|
||||
@ -77,6 +80,8 @@ struct tpacket_req3 {
|
||||
unsigned int tp_feature_req_word;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int sk1, sk2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user