tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
musl-obstack: fix build on darwin
usertam
9 months ago
dc44a14c
7b7a9a6a
+32
-1
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
mu
musl-obstack
0001-ignore-obstack_free-alias-on-darwin.patch
package.nix
+27
pkgs/by-name/mu/musl-obstack/0001-ignore-obstack_free-alias-on-darwin.patch
···
1
1
+
From 44679bc1a03302aa6b1eb19220d9723e9e0e4d3f Mon Sep 17 00:00:00 2001
2
2
+
From: usertam <code@usertam.dev>
3
3
+
Date: Fri, 16 May 2025 23:29:41 +0800
4
4
+
Subject: [PATCH] ignore obstack_free alias on darwin
5
5
+
6
6
+
clang will complain "error: aliases are not supported on darwin".
7
7
+
---
8
8
+
obstack.c | 2 ++
9
9
+
1 file changed, 2 insertions(+)
10
10
+
11
11
+
diff --git a/obstack.c b/obstack.c
12
12
+
index 1f2f4c7..b9be9dd 100644
13
13
+
--- a/obstack.c
14
14
+
+++ b/obstack.c
15
15
+
@@ -294,7 +294,9 @@ _obstack_free (struct obstack *h, void *obj)
16
16
+
abort ();
17
17
+
}
18
18
+
19
19
+
+#ifndef __APPLE__
20
20
+
extern __typeof(_obstack_free) obstack_free __attribute__((alias("_obstack_free")));
21
21
+
+#endif
22
22
+
23
23
+
_OBSTACK_SIZE_T
24
24
+
_obstack_memory_used (struct obstack *h)
25
25
+
--
26
26
+
2.48.1
27
27
+
+5
-1
pkgs/by-name/mu/musl-obstack/package.nix
···
17
17
sha256 = "sha256-oydS7FubUniMHAUWfg84OH9+CZ0JCrTXy7jzwOyJzC8=";
18
18
};
19
19
20
20
+
patches = lib.optionals stdenv.isDarwin [
21
21
+
./0001-ignore-obstack_free-alias-on-darwin.patch
22
22
+
];
23
23
+
20
24
nativeBuildInputs = [
21
25
autoreconfHook
22
26
pkg-config
···
27
31
meta = with lib; {
28
32
homepage = "https://github.com/void-linux/musl-obstack";
29
33
description = "An extraction of the obstack functions and macros from GNU libiberty for use with musl-libc";
30
30
-
platforms = platforms.linux;
34
34
+
platforms = platforms.unix;
31
35
license = licenses.lgpl21Plus;
32
36
maintainers = [ maintainers.pjjw ];
33
37
};