From: Peter Dinda Date: Thu, 14 Jul 2016 00:09:03 +0000 (-0500) Subject: More Linux 3.19+ kernel compatability fixes X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4b69a7f12e47d146be4cecf1d46dfd37f87d89a;p=palacios.git More Linux 3.19+ kernel compatability fixes --- diff --git a/Makefile b/Makefile index 8e51d8f..97022f3 100644 --- a/Makefile +++ b/Makefile @@ -480,15 +480,12 @@ endif ifdef V3_CONFIG_LINUX DEFAULT_EXTRA_TARGETS=linux_module else -DEFAULT_EXTRA_TARGETS= -endif - ifdef V3_CONFIG_NAUTILUS DEFAULT_EXTRA_TARGETS=nautilus else DEFAULT_EXTRA_TARGETS= endif - +endif # The all: target is the default when no target is given on the # command line. @@ -654,13 +651,14 @@ linux_module/v3vee.ko: linux_module/*.c linux_module/*.h libv3vee.a cd linux_module/ && make -j 8 cp linux_module/v3vee.ko v3vee.ko - +.PHONY: linux_module linux_module: linux_module/v3vee.ko nautilus/libnautilus.a: nautilus/*.c nautilus/*.h libv3vee.a cd nautilus/ && make cp nautilus/libnautilus.a . +.PHONY: nautilus nautilus: nautilus/libnautilus.a diff --git a/linux_module/iface-packet.c b/linux_module/iface-packet.c index 6ec4de0..37728ed 100644 --- a/linux_module/iface-packet.c +++ b/linux_module/iface-packet.c @@ -78,8 +78,12 @@ recv_pkt(struct socket * raw_sock, unsigned char * pkt, unsigned int len) { msg.msg_namelen = 0; msg.msg_control = NULL; msg.msg_controllen = 0; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) msg.msg_iov = &iov; msg.msg_iovlen = 1; +#else + iov_iter_init(&(msg.msg_iter),WRITE,&iov,1,0); +#endif msg.msg_control = NULL; oldfs = get_fs(); @@ -308,8 +312,12 @@ palacios_packet_send(struct v3_packet * packet, iov.iov_base = (void *)pkt; iov.iov_len = (__kernel_size_t)len; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) msg.msg_iov = &iov; msg.msg_iovlen = 1; +#else + iov_iter_init(&(msg.msg_iter),WRITE,&iov,1,0); +#endif msg.msg_control = NULL; msg.msg_controllen = 0; msg.msg_name = NULL;