git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #39442 from dtzWill/fix/glibc-no-fetchpatch

glibc: use local copy of patch to fix w/musl

commitdfcae92929bd0c0b4f9f459ce4cd3d178fc74a4a authorWill Dietz <github@wdtz.org> dateTue 24 Apr 2018, 17:14 (9 years ago) parent3f42a6ec3ab285
2 files changed+39−6
pkgs/development/libraries/glibc/common.nix+1−6 pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch+38
pkgs/development/libraries/glibc/common.nix+1−6
@@ -95,12 +95,7 @@ stdenv.mkDerivation ({
9595 ./allow-kernel-2.6.32.patch
9696 ]
9797 ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch
98− ++ lib.optional stdenv.hostPlatform.isMusl
99− (fetchpatch {
100− name = "fix-with-musl.patch";
101− url = "https://sourceware.org/bugzilla/attachment.cgi?id=10151&action=diff&collapsed=&headers=1&format=raw";
102− sha256 = "18kk534k6da5bkbsy1ivbi77iin76lsna168mfcbwv4ik5vpziq2";
103− });
98+ ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch;
10499
105100 postPatch =
106101 ''
pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patchnew file+38
@@ -0,0 +1,38 @@
1+@@ -, +, @@
2+---
3+ sunrpc/rpc/types.h | 22 ++++++----------------
4+ 1 file changed, 6 insertions(+), 16 deletions(-)
5+--- a/sunrpc/rpc/types.h
6++++ a/sunrpc/rpc/types.h
7+@@ -69,24 +69,14 @@ typedef unsigned long rpcport_t;
8+ #include <sys/types.h>
9+ #endif
10+
11+-#if defined __APPLE_CC__ || defined __FreeBSD__
12+-# define __u_char_defined
13+-# define __daddr_t_defined
14+-#endif
15+-
16+-#ifndef __u_char_defined
17+-typedef __u_char u_char;
18+-typedef __u_short u_short;
19+-typedef __u_int u_int;
20+-typedef __u_long u_long;
21+-typedef __quad_t quad_t;
22+-typedef __u_quad_t u_quad_t;
23+-typedef __fsid_t fsid_t;
24++/* IMPORTANT NOTE: This has been modified to build against the musl C
25++ * library and it probably now ONLY builds with the musl C library.
26++ *
27++ * See: https://sourceware.org/bugzilla/show_bug.cgi?id=21604
28++ */
29+ # define __u_char_defined
30+-#endif
31+ #ifndef __daddr_t_defined
32+-typedef __daddr_t daddr_t;
33+-typedef __caddr_t caddr_t;
34++typedef int daddr_t;
35+ # define __daddr_t_defined
36+ #endif
37+
38+--