Skip to contentSkip to conversation

vhost.c: include <linux/vhost.h> last

Qemu-devel Applied Marcelo Tosatti 3 participants 3 messages Apr 8, 2010 – Apr 13, 2010

lore
Share & tools
lore
#0 lore raw

So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels.

hw/vhost.c +1 -1
index ad2f98a..d37a66e 100644
@@ -10,13 +10,13 @@
  * the COPYING file in the top-level directory.
  */
 
-#include <linux/vhost.h>
 #include <sys/ioctl.h>
 #include <sys/eventfd.h>
 #include "vhost.h"
 #include "hw/hw.h"
 /* For range_get_last */
 #include "pci.h"
+#include <linux/vhost.h>
 
 static void vhost_dev_sync_region(struct vhost_dev *dev,
                                   uint64_t mfirst, uint64_t mlast,
#1 lore raw
Quoted 5 lines · Marcelo Tosatti

So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels.

Quoted 19 lines
hw/vhost.c +1 -1
index ad2f98a..d37a66e 100644
@@ -10,13 +10,13 @@
  * the COPYING file in the top-level directory.
  */
 
-#include <linux/vhost.h>
 #include <sys/ioctl.h>
 #include <sys/eventfd.h>
 #include "vhost.h"
 #include "hw/hw.h"
 /* For range_get_last */
 #include "pci.h"
+#include <linux/vhost.h>
 
 static void vhost_dev_sync_region(struct vhost_dev *dev,
                                   uint64_t mfirst, uint64_t mlast,
#2 lore raw
Quoted 8 lines · Michael S. Tsirkin
Quoted 5 lines · Marcelo Tosatti

So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels.

Thanks, applied.

Quoted 22 lines
Quoted 19 lines
hw/vhost.c +1 -1
index ad2f98a..d37a66e 100644
@@ -10,13 +10,13 @@
  * the COPYING file in the top-level directory.
  */
 
-#include <linux/vhost.h>
 #include <sys/ioctl.h>
 #include <sys/eventfd.h>
 #include "vhost.h"
 #include "hw/hw.h"
 /* For range_get_last */
 #include "pci.h"
+#include <linux/vhost.h>
 
 static void vhost_dev_sync_region(struct vhost_dev *dev,
                                   uint64_t mfirst, uint64_t mlast,
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net