darwin.diskdev_cmds: fix build with clang 16
Fix an implicit `int` on argc, which is an error with newer clangs.
This commit is contained in:
@@ -5,12 +5,17 @@ let
|
||||
xnu-src = if stdenv.isAarch64 then macosPackages_11_0_1.xnu.src else xnu.src;
|
||||
arch = if stdenv.isAarch64 then "arm" else "i386";
|
||||
in appleDerivation {
|
||||
patches = [
|
||||
# Fixes a build failure with newer versions of clang that make implicit int an error.
|
||||
./fix-implicit-int.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ libutil ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-I.";
|
||||
NIX_LDFLAGS = "-lutil";
|
||||
patchPhase = ''
|
||||
prePatch = ''
|
||||
# ugly hacks for missing headers
|
||||
# most are bsd related - probably should make this a drv
|
||||
unpackFile ${Libc.src}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
diff -ur a/diskdev_cmds.xcodeproj/project.pbxproj b/diskdev_cmds.xcodeproj/project.pbxproj
|
||||
--- a/quota.tproj/quota.c 2021-10-06 01:13:40.000000000 -0400
|
||||
+++ b/quota.tproj/quota.c 2023-10-27 08:24:05.960965958 -0400
|
||||
@@ -115,6 +115,7 @@
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
+ int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int ngroups;
|
||||
Reference in New Issue
Block a user