mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
workaround for conflisct with clang/unistd.h
This commit is contained in:
parent
4b5594c63d
commit
0cd9843f5f
4 changed files with 16 additions and 3 deletions
|
@ -28,11 +28,17 @@
|
|||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSError.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h> // for gid_t and uid_t
|
||||
/* Some versions of unistd.h use __block, but that's a reserved word
|
||||
* for Clang so we temporarily redefine it while including the file.
|
||||
*/
|
||||
#ifdef __block
|
||||
#undef __block
|
||||
#endif
|
||||
|
||||
#define __block __gs_unistd_block
|
||||
#include <unistd.h> // for gid_t and uid_t
|
||||
#undef __block
|
||||
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue