qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] buildbot failure in qemu on default_x86_64_rhel5


From: Aneesh Kumar K.V
Subject: Re: [Qemu-devel] buildbot failure in qemu on default_x86_64_rhel5
Date: Sat, 01 Oct 2011 14:28:47 +0530
User-agent: Notmuch/0.9_rc1 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu)

On Fri, 30 Sep 2011 09:26:53 +0100, Stefan Hajnoczi <address@hidden> wrote:
> On Fri, Sep 30, 2011 at 12:28 AM,  <address@hidden> wrote:
> > The Buildbot has detected a new failure on builder default_x86_64_rhel5 
> > while building qemu.
> > Full details are available at:
> >  http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel5/builds/24
> 
> Build error on RHEL 5 in virtio-9p-handle.c:
> /home/buildbot/slave-public/default_x86_64_rhel5/build/hw/9pfs/virtio-9p-handle.c:
> In function 'handle_utimensat':
> /home/buildbot/slave-public/default_x86_64_rhel5/build/hw/9pfs/virtio-9p-handle.c:377:
> warning: implicit declaration of function 'futimens'
> /home/buildbot/slave-public/default_x86_64_rhel5/build/hw/9pfs/virtio-9p-handle.c:377:
> warning: nested extern declaration of 'futimens'
> 
> RHEL 5 only has glibc 2.5 but futimens(2) was introduced in glibc 2.6.

We can make handle only available to glibc 2.6 and above . Handle fs
drive will anyhow require a 2.6.39 kernel. Something like.


diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
index 860b0e3..a7a8930 100644
--- a/hw/9pfs/virtio-9p-handle.c
+++ b/hw/9pfs/virtio-9p-handle.c
@@ -390,7 +390,13 @@ static int handle_utimensat(FsContext *ctx, V9fsPath 
*fs_path,
     if (fd < 0) {
         return fd;
     }
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 6
+    /* futimens is only available with glibc 2.6 and above.*/
     ret = futimens(fd, buf);
+#else
+    ret  = -1;
+    errno = ENOSYS;
+#endif
     close(fd);
     return ret;
 }
@@ -591,8 +597,16 @@ static int handle_init(FsContext *ctx)
     int ret, mnt_id;
     struct statfs stbuf;
     struct file_handle fh;
-    struct handle_data *data = g_malloc(sizeof(struct handle_data));
+    struct handle_data *data;
 
+#if __GLIBC__ <= 2 && __GLIBC_MINOR__ < 6
+    /*
+     * We support only above glibc 2.6. Older distro will anyhow
+     * not have handle syscall support in the kernel.
+     */
+    return -1;
+#endif
+    data = g_malloc(sizeof(struct handle_data));
     data->mountfd = open(ctx->fs_root, O_DIRECTORY);
     if (data->mountfd < 0) {
         ret = data->mountfd;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]