[PATCH] server: ifdefs guards for unistd.h and sys/types.h

Alexandre Julliard julliard at winehq.org
Tue Oct 19 09:02:01 CDT 2021


Craig Andrews <candrews at integralblue.com> writes:

> On 2021-10-19 04:50, Alexandre Julliard wrote:
>> Craig Andrews <candrews at integralblue.com> writes:
>> 
>>> unistd.h and sys/types.h should have ifdef HAVE_UNISTD_H and ifdef
>>> HAVE_SYS_TYPES_H guards, respectively.
>>> These includes were added in commit 8184bcc9
>> Do you actually have a platform that requires this?
>
> I was tracking down a build failure of Wine 6.19 on Alpine, and I
> thought these guards may have something to do with it. However, I 
> eventually realized that the fix for the build failure was commit
> e19ba44f231c668b044beaba018cf1afa3b92bd4.
>
> I figured I would still provide this guard patch to the mailing list
> though, since it improves consistency; almost all other uses of
> unistd.h and sys/types.h have these guards, so why not change that
> "almost all" to an "all?"

There are essentially no guards for sys/types.h, and we shouldn't be
adding them. There are some for unistd.h for Windows compatibility, but
that's no longer an issue in most places.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list