usr/include/dispatch/dispatch.h has the following:
#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H
#include <unistd.h>
#endif
But any code that tries to bring in dispatch.h without having defined HAVE_UNISTD_H gets an error:
/Applications/Xcode_9.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/dispatch/dispatch.h:38:45: error: expected value in expression
#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H
^Which makes sense as I think that #if is syntacticaly wrong in the case when HAVE_UNISTD_H is undefined.
And reading it it makes no sense anyway. Given what it seems to be doing its saying not to include unistd.h only in the case where HAVE_UNISTD_H is defined but is 0.