tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
krb5: Add patches to fix build with musl on 1.18
Niklas Hambüchen
6 years ago
5676e6df
abe5f707
+70
-1
3 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
kerberos
krb5-Fix-Linux-build-error-with-musl-libc.patch
krb5-Fix-typo-in-musl-build-fix.patch
krb5.nix
+32
pkgs/development/libraries/kerberos/krb5-Fix-Linux-build-error-with-musl-libc.patch
···
1
1
+
From cbdbc8d00d31344fafe00e0fdf984e04e631f7c4 Mon Sep 17 00:00:00 2001
2
2
+
From: TBK <tbk@jjtc.eu>
3
3
+
Date: Wed, 26 Feb 2020 21:12:45 +0100
4
4
+
Subject: [PATCH] Fix Linux build error with musl libc
5
5
+
6
6
+
Commit bf5953c549a6d279977df69ffe89b2ba51460eaf caused a build failure
7
7
+
on non-glibc Linux build environments. Change the conditionalization
8
8
+
so that __GLIBC_PREREQ will only be used if it is defined.
9
9
+
10
10
+
[ghudson@mit.edu: simplified conditionals; rewrote commit message]
11
11
+
12
12
+
ticket: 8880 (new)
13
13
+
tags: pullup
14
14
+
target_version: 1.18-next
15
15
+
---
16
16
+
src/util/support/plugins.c | 3 +--
17
17
+
1 file changed, 1 insertion(+), 2 deletions(-)
18
18
+
19
19
+
diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c
20
20
+
index 3329db7dc3..1644d16fd0 100644
21
21
+
--- a/src/util/support/plugins.c
22
22
+
+++ b/src/util/support/plugins.c
23
23
+
@@ -62,8 +62,7 @@
24
24
+
* dlopen() with RTLD_NODELETE, we weren't going to unload the plugin objects
25
25
+
* anyway.
26
26
+
*/
27
27
+
-#ifdef __linux__
28
28
+
-#include <features.h>
29
29
+
+#ifdef __GLIBC__PREREQ
30
30
+
#if ! __GLIBC_PREREQ(2, 25)
31
31
+
#define dlclose(x)
32
32
+
#endif
+28
pkgs/development/libraries/kerberos/krb5-Fix-typo-in-musl-build-fix.patch
···
1
1
+
From b009cca2026b615ef5386faa4c0230bc27c4161d Mon Sep 17 00:00:00 2001
2
2
+
From: Greg Hudson <ghudson@mit.edu>
3
3
+
Date: Thu, 12 Mar 2020 00:44:10 -0400
4
4
+
Subject: [PATCH] Fix typo in musl build fix
5
5
+
6
6
+
Commit cbdbc8d00d31344fafe00e0fdf984e04e631f7c4 checked for
7
7
+
__GLIBC__PREREQ instead of __GLIBC_PREREQ, thus accidentally reverting
8
8
+
the workaround introduced in commit
9
9
+
bf5953c549a6d279977df69ffe89b2ba51460eaf. Fix the typo.
10
10
+
11
11
+
ticket: 8880
12
12
+
---
13
13
+
src/util/support/plugins.c | 2 +-
14
14
+
1 file changed, 1 insertion(+), 1 deletion(-)
15
15
+
16
16
+
diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c
17
17
+
index 1644d16fd0..1ff10c354d 100644
18
18
+
--- a/src/util/support/plugins.c
19
19
+
+++ b/src/util/support/plugins.c
20
20
+
@@ -62,7 +62,7 @@
21
21
+
* dlopen() with RTLD_NODELETE, we weren't going to unload the plugin objects
22
22
+
* anyway.
23
23
+
*/
24
24
+
-#ifdef __GLIBC__PREREQ
25
25
+
+#ifdef __GLIBC_PREREQ
26
26
+
#if ! __GLIBC_PREREQ(2, 25)
27
27
+
#define dlclose(x)
28
28
+
#endif
+10
-1
pkgs/development/libraries/kerberos/krb5.nix
···
14
14
with stdenv.lib;
15
15
stdenv.mkDerivation rec {
16
16
name = "${type}krb5-${version}";
17
17
-
majorVersion = "1.18";
17
17
+
majorVersion = "1.18"; # remove patches below with next upgrade
18
18
version = majorVersion;
19
19
20
20
src = fetchurl {
21
21
url = "https://kerberos.org/dist/krb5/${majorVersion}/krb5-${version}.tar.gz";
22
22
sha256 = "121c5xsy3x0i4wdkrpw62yhvji6virbh6n30ypazkp0isws3k4bk";
23
23
};
24
24
+
25
25
+
patches = optionals stdenv.hostPlatform.isMusl [
26
26
+
# TODO: Remove with next release > 1.18
27
27
+
# Patches to fix musl build with 1.18.
28
28
+
# Not using `fetchpatch` for these for now to avoid infinite recursion
29
29
+
# errors in downstream projects (unclear if it's a nixpkgs issue so far).
30
30
+
./krb5-Fix-Linux-build-error-with-musl-libc.patch
31
31
+
./krb5-Fix-typo-in-musl-build-fix.patch
32
32
+
];
24
33
25
34
outputs = [ "out" "dev" ];
26
35