Re: [PATCH v4] virtio-9p: fix build on !CONFIG_UTIMENSAT

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

 



Hello,

Am Donnerstag 18 November 2010 10:05:59 schrieb Hidetoshi Seto:
> > Your have to be careful about compile-time-detection and
> > runtime-detection:
...
> -#ifdef CONFIG_UTIMENSAT
> -    return utimensat(dirfd, path, times, flags);
> -#else
> +    {
> +        int ret = utimensat(dirfd, path, times, flags);
> +        if (ret != -1 || errno != ENOSYS) {
> +            return ret;
> +        }
> +    }

You might still want to do the compile-time-check, something like:
#ifdef CONFIG_UTIMENSAT
    {
        int ret = utimensat(dirfd, path, times, flags);
        if (ret != -1 || errno != ENOSYS) {
            return ret;
        }
    }
#endif
// fallback

Sincerely
Philipp Hahn
-- 
Philipp Hahn           Open Source Software Engineer      hahn@xxxxxxxxxxxxx   
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  28359 Bremen                   fax: +49 421 22 232-99
                                                    http://www.univention.de

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux