mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
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
@ -61,7 +61,11 @@ static const char * rewrite(const char * path, char * buf)
|
|||||||
|
|
||||||
static int open_needs_mode(int flags)
|
static int open_needs_mode(int flags)
|
||||||
{
|
{
|
||||||
|
#ifdef O_TMPFILE
|
||||||
return (flags & O_CREAT) || (flags & O_TMPFILE) == 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 -
|
/* The following set of Glibc library functions is very incomplete -
|
||||||
|
Loading…
Reference in New Issue
Block a user