diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-05-31 22:30:43 -0400 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-06-10 17:15:08 -0400 |
commit | cd4ab1d9fd9f921451625bc131f8e2d07922ed64 (patch) | |
tree | 144d4a393dd5e64e137ed36ce82c0a65243b5421 /pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix | |
parent | 323e9a44c251f87da3b77087b9e1f6f36eb719f8 (diff) | |
download | nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.tar nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.tar.gz nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.tar.bz2 nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.tar.lz nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.tar.xz nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.tar.zst nixpkgs-cd4ab1d9fd9f921451625bc131f8e2d07922ed64.zip |
darwin.system_cmds: fix build with clang 16
Clang 16 makes implicit declarations an error by default. The headers are available, so include them. `getline` was renamed to `get_line` to avoid a name clash. `util.h` includes `stdio.h`, which defines `getline`.
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix')
-rw-r--r-- | pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix index 0c40bc3b186..f708d774090 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix @@ -30,7 +30,12 @@ appleDerivation { "-DAU_SESSION_FLAG_HAS_AUTHENTICATED=0x4000" ] ++ lib.optional (!stdenv.isLinux) " -D__FreeBSD__ "); - patchPhase = '' + patches = [ + # Fix implicit declarations that cause builds to fail when built with clang 16. + ./fix-implicit-declarations.patch + ]; + + postPatch = '' substituteInPlace login.tproj/login.c \ --replace bsm/audit_session.h bsm/audit.h substituteInPlace login.tproj/login_audit.c \ |