Message ID | 1308334282-11865-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 2011-06-17 at 23:41 +0530, Aneesh Kumar K.V wrote: > Otherwise many things can break, such as mapping of stat to stat64 We always include our headers before system headers to make sure we don't have any hidden prerequisites or dependencies within the headers. Why did you need to move system headers before our headers in this case? > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> > --- > tools/kvm/virtio/9p.c | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-)
On Fri, 2011-06-17 at 15:45 -0400, Sasha Levin wrote: > On Fri, 2011-06-17 at 23:41 +0530, Aneesh Kumar K.V wrote: > > Otherwise many things can break, such as mapping of stat to stat64 > > We always include our headers before system headers to make sure we > don't have any hidden prerequisites or dependencies within the headers. > > Why did you need to move system headers before our headers in this case? The stat64() breakage seems rather odd since we do this in the Makefile: DEFINES += -D_FILE_OFFSET_BITS=64 DEFINES += -D_GNU_SOURCE Aneesh, what kind of build problems are you seeing? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 17 Jun 2011 22:47:39 +0300, Pekka Enberg <penberg@kernel.org> wrote: > On Fri, 2011-06-17 at 15:45 -0400, Sasha Levin wrote: > > On Fri, 2011-06-17 at 23:41 +0530, Aneesh Kumar K.V wrote: > > > Otherwise many things can break, such as mapping of stat to stat64 > > > > We always include our headers before system headers to make sure we > > don't have any hidden prerequisites or dependencies within the headers. > > > > Why did you need to move system headers before our headers in this case? > > The stat64() breakage seems rather odd since we do this in the Makefile: > > DEFINES += -D_FILE_OFFSET_BITS=64 > DEFINES += -D_GNU_SOURCE > > Aneesh, what kind of build problems are you seeing? ubuntu natty x86_32 system. When you try to mount 9p you get "not a directory" error, because virtio_p9_stat gets the stat value wrong and virtio_p9_fill_stat don't find the export dir as a directory. -aneesh -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tools/kvm/virtio/9p.c b/tools/kvm/virtio/9p.c index 38a997d..918bb81 100644 --- a/tools/kvm/virtio/9p.c +++ b/tools/kvm/virtio/9p.c @@ -1,3 +1,9 @@ +#include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <pthread.h> +#include <dirent.h> + #include "kvm/virtio-9p.h" #include "kvm/virtio-pci-dev.h" #include "kvm/virtio.h" @@ -13,12 +19,6 @@ #include <linux/virtio_9p.h> #include <net/9p/9p.h> -#include <fcntl.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <pthread.h> -#include <dirent.h> - #define NUM_VIRT_QUEUES 1 #define VIRTIO_P9_QUEUE_SIZE 128 #define VIRTIO_P9_TAG "kvm_9p"
Otherwise many things can break, such as mapping of stat to stat64 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- tools/kvm/virtio/9p.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)