Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darwin.diskdev_cmds: fix build with clang 16 #263778

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;