summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-01-24 11:43:55 +0000
committerGitHub <noreply@github.com>2020-01-24 11:43:55 +0000
commit3c62a8225903c35a79414be1ccae8ab5c90753a1 (patch)
tree7445161b7cda64de129e87fdd89b14a352ae13f4 /pkgs
parentddbb15dc7951af2bf72421bf6793b241b4c28757 (diff)
parentc3ccac15eb0afb1730e995748167d5e34038ccdb (diff)
downloadnixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.tar
nixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.tar.gz
nixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.tar.bz2
nixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.tar.lz
nixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.tar.xz
nixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.tar.zst
nixpkgs-3c62a8225903c35a79414be1ccae8ab5c90753a1.zip
libredirect: fix build on darwin (#78399)
libredirect: fix build on darwin
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/libredirect/libredirect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c
index d31b7551e94..e7f74c736ab 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 -