summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-10-13 10:07:56 +0100
committerJoerg Thalheim <joerg@thalheim.io>2017-10-13 10:08:34 +0100
commit6ec6af462573c07cab55dd56ec8e05f7b3dd719b (patch)
treed77b725fb3afb7582ec4aed9970f57be06b71586 /pkgs/tools
parent2864bc8fd904c28c65486c75136f6d3892023e61 (diff)
downloadnixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.tar
nixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.tar.gz
nixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.tar.bz2
nixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.tar.lz
nixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.tar.xz
nixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.tar.zst
nixlib-6ec6af462573c07cab55dd56ec8e05f7b3dd719b.zip
djbdns: fix build in usernamespaces
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/djbdns/default.nix4
-rw-r--r--pkgs/tools/networking/djbdns/fix-nix-usernamespace-build.patch10
2 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/tools/networking/djbdns/default.nix b/pkgs/tools/networking/djbdns/default.nix
index 7537ab1c47ac..178d27f20184 100644
--- a/pkgs/tools/networking/djbdns/default.nix
+++ b/pkgs/tools/networking/djbdns/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     sha256 = "0j3baf92vkczr5fxww7rp1b7gmczxmmgrqc8w2dy7kgk09m85k9w";
   };
 
-  patches = [ ./hier.patch ];
+  patches = [ ./hier.patch ./fix-nix-usernamespace-build.patch ];
 
   postPatch = ''
     echo gcc -O2 -include ${glibc.dev}/include/errno.h > conf-cc
@@ -45,4 +45,4 @@ stdenv.mkDerivation {
     license = licenses.publicDomain;
     maintainers = with maintainers; [ jerith666 ];
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/tools/networking/djbdns/fix-nix-usernamespace-build.patch b/pkgs/tools/networking/djbdns/fix-nix-usernamespace-build.patch
new file mode 100644
index 000000000000..abd9e756a21f
--- /dev/null
+++ b/pkgs/tools/networking/djbdns/fix-nix-usernamespace-build.patch
@@ -0,0 +1,10 @@
+--- djbdns-1.05.org/chkshsgr.c	2001-02-11 21:11:45.000000000 +0000
++++ djbdns-1.05/chkshsgr.c	2017-10-13 10:06:09.392578927 +0100
+@@ -2,6 +2,7 @@
+ 
+ int main()
+ {
++  return 0;
+   short x[4];
+ 
+   x[0] = x[1] = 0;