about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-04-22 22:02:38 -0500
committerWill Dietz <w@wdtz.org>2018-04-24 16:57:57 -0500
commitc3ab285ce20934c439ab63473e27b37f0e240ba4 (patch)
tree9d95babd6f4d0bb74e6b4963f09d1f23f8908a18 /pkgs/development
parent3f42a6eb84cfc56790c1347f081551650f7701f3 (diff)
downloadnixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.tar
nixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.tar.gz
nixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.tar.bz2
nixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.tar.lz
nixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.tar.xz
nixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.tar.zst
nixlib-c3ab285ce20934c439ab63473e27b37f0e240ba4.zip
glibc: use local copy of patch to fix w/musl
fetchpatch doesn't work with bootstrap fetchurl,
so just use local file like we do for other glibc patches.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/glibc/common.nix7
-rw-r--r--pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch38
2 files changed, 39 insertions, 6 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index c8716bfdc796..31567f0049dd 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -95,12 +95,7 @@ stdenv.mkDerivation ({
       ./allow-kernel-2.6.32.patch
     ]
     ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch
-    ++ lib.optional stdenv.hostPlatform.isMusl
-      (fetchpatch {
-        name = "fix-with-musl.patch";
-        url = "https://sourceware.org/bugzilla/attachment.cgi?id=10151&action=diff&collapsed=&headers=1&format=raw";
-        sha256 = "18kk534k6da5bkbsy1ivbi77iin76lsna168mfcbwv4ik5vpziq2";
-      });
+    ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch;
 
   postPatch =
     ''
diff --git a/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch b/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch
new file mode 100644
index 000000000000..19f8bfc7cce8
--- /dev/null
+++ b/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch
@@ -0,0 +1,38 @@
+@@ -, +, @@ 
+---
+ sunrpc/rpc/types.h | 22 ++++++----------------
+ 1 file changed, 6 insertions(+), 16 deletions(-)
+--- a/sunrpc/rpc/types.h	
++++ a/sunrpc/rpc/types.h	
+@@ -69,24 +69,14 @@ typedef unsigned long rpcport_t;
+ #include <sys/types.h>
+ #endif
+ 
+-#if defined __APPLE_CC__ || defined __FreeBSD__
+-# define __u_char_defined
+-# define __daddr_t_defined
+-#endif
+-
+-#ifndef __u_char_defined
+-typedef __u_char u_char;
+-typedef __u_short u_short;
+-typedef __u_int u_int;
+-typedef __u_long u_long;
+-typedef __quad_t quad_t;
+-typedef __u_quad_t u_quad_t;
+-typedef __fsid_t fsid_t;
++/* IMPORTANT NOTE: This has been modified to build against the musl C
++ * library and it probably now ONLY builds with the musl C library.
++ *
++ * See: https://sourceware.org/bugzilla/show_bug.cgi?id=21604
++ */
+ # define __u_char_defined
+-#endif
+ #ifndef __daddr_t_defined
+-typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++typedef int daddr_t;
+ # define __daddr_t_defined
+ #endif
+ 
+--