diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2020-01-23 20:20:20 -0500 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2020-01-23 20:20:20 -0500 |
commit | c3ccac15eb0afb1730e995748167d5e34038ccdb (patch) | |
tree | 379688239ed05a73be3ce4e92b232602c044a02f /pkgs/build-support/libredirect | |
parent | 385b9aee085b6c5af25f843eb577b14d2b029748 (diff) |
libredirect: fix build on darwin
Fix build failure on darwin due to absence of `O_TMPFILE`.
Diffstat (limited to 'pkgs/build-support/libredirect')
-rw-r--r-- | pkgs/build-support/libredirect/libredirect.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c index d31b7551e949a..e7f74c736ab06 100644 --- a/pkgs/build-support/libredirect/libredirect.c +++ b/pkgs/build-support/libredirect/libredirect.c @@ -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 - |