qcap: Fix compile error when O_CLOEXEC is not defined.

Alexandre Julliard julliard at winehq.org
Tue Mar 7 09:18:19 CST 2017


Sebastian Lackner <sebastian at fds-team.de> writes:

> Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
> ---
>
> Defining to 0 ensures that it doesn't do any harm. If we don't
> care about ancient systems, we can probably also remove the fcntl call.
> On modern systems, setting CLOEXEC twice (via open and fcntl) shouldn't
> hurt.

I'm too lazy to check, but I'm wondering if passing O_CLOEXEC would
cause the open to fail on an ancient system, and whether we should be
checking for EINVAL and retrying...

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list