libredirect: fix build on darwin
Fix build failure on darwin due to absence of `O_TMPFILE`.
This commit is contained in:
parent
385b9aee08
commit
c3ccac15eb
1 changed files with 4 additions and 0 deletions
|
@ -61,7 +61,11 @@ static const char * rewrite(const char * path, char * buf)
|
|||
|
||||
static int open_needs_mode(int flags)
|
||||
{
|
||||
#ifdef O_TMPFILE
|
||||
return (flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE;
|
||||
#else
|
||||
return flags & O_CREAT;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The following set of Glibc library functions is very incomplete -
|
||||
|
|
Loading…
Reference in a new issue