public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Philipp Hahn <hahn@univention.de>
To: kvm@vger.kernel.org
Subject: Re: [PATCH v4] virtio-9p: fix build on !CONFIG_UTIMENSAT
Date: Thu, 18 Nov 2010 14:12:13 +0100	[thread overview]
Message-ID: <201011181412.26806.hahn@univention.de> (raw)
In-Reply-To: <4CE4EC77.6030105@jp.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

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@univention.de   
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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2010-11-18 13:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18  0:41 [PATCH v4] virtio-9p: fix build on !CONFIG_UTIMENSAT Hidetoshi Seto
2010-11-18  8:02 ` Jes Sorensen
2010-11-18  8:48   ` Hidetoshi Seto
2010-11-18  9:09     ` Jes Sorensen
2010-11-18  8:28 ` Philipp Hahn
2010-11-18  9:05   ` Hidetoshi Seto
2010-11-18 13:12     ` Philipp Hahn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201011181412.26806.hahn@univention.de \
    --to=hahn@univention.de \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox