qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.2] osdep: Fix compilation failure on BSD s


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-1.2] osdep: Fix compilation failure on BSD systems
Date: Thu, 16 Aug 2012 14:25:47 +0100

On 16 August 2012 14:11, Corey Bryant <address@hidden> wrote:
>
>
> On 08/16/2012 07:15 AM, Peter Maydell wrote:
>>
>> Fix compilation failure on BSD systems (which don't have
>> O_DIRECT or O_NOATIME:
>> osdep.c:116: error: ‘O_DIRECT’ undeclared (first use in this function)
>> osdep.c:116: error: (Each undeclared identifier is reported only once
>> osdep.c:116: error: for each function it appears in.)
>> osdep.c:116: error: ‘O_NOATIME’ undeclared (first use in this function)
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> PS: Do we care about O_DSYNC, O_RSYNC, O_SYNC? POSIX says those can be
>> used via fcntl() too...
>
>
> Thanks very much Peter.  The patch looks good to me.
>
> Could you point me to the reference you saw the fcntl description in?  I
> didn't notice any flags mentioned here:
> http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html
>
> The choice of flags was based on the Linux man page for fcntl() which says
> F_SETFL can change only the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and
> O_NONBLOCK flags.

The posix spec for fcntl.h
http://pubs.opengroup.org/onlinepubs/007908799/xsh/fcntl.h.html
describes all of O_APPEND O_DSYNC O_NONBLOCK O_RSYNC O_SYNC
as "File status flags used for open() and fcntl()".

(However the MacOS fcntl manpage lists only O_APPEND, O_ASYNC and
O_NONBLOCK for F_GETFL/F_SETFL flags.)

-- PMM



reply via email to

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