Repository navigation
fix(agc): declare environ for macOS host reports - #15205
mashingaan wants to merge 1 commit into
Conversation
kurexw
left a comment
There was a problem hiding this comment.
Checked on macOS 27.2 on an Apple M4 (x86-64 build under Rosetta, Apple clang 21.0.0) against main at a72186d.
This change is already on main. #14867 (merged 2026-11-03) closed #14371. It added the same declaration inside the non-Windows branch of the includes in HostReportSources.cpp, at line 17:
#else
#include <cerrno>
#include <sys/utsname.h>
#include <unistd.h>
extern char** environ;
#endifThis PR's merge-base, 9090972, predates that. The PR still merges cleanly, but merging it now adds a second, identical #ifndef _WIN32 extern char** environ; #endif block just after the one above.
With the PR merged, HostReportSources.cpp compiles with Apple clang. The only warning is -Wreturn-type-c-linkage from HostCpu.hpp:31, and main gives the same warning, so the duplicate declaration doesn't break anything. But it adds nothing. Closing this as superseded by #14867 seems right.
I ran file_streams as a smoke test on this build. It fails exactly as it does on main (Stream scan changed a matching failure to input failure, which #21720 and #21721 address), so that failure has nothing to do with this PR.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the declaration matches the existing non-Windows declarations and resolves the use of environ in the host report source.
What I ran
Reviewed head ee697a1b726748eda988063821a0e3383ab846e1. No build or tests were run; the PR description says local testing was not run and Hosted CI is pending.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Change and use inspected |
| Build and tests | not run | CI pending per description |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The macOS compile claim and Hosted CI results were not verified. Read the full changed file core/libs/prx/libSceAgcDriver/Execution/src/HostReportSources.cpp, the relevant declaration/use in PerformanceTrace.cpp and FrameRecorder.cpp, and the supplied description, commits, manifest, and diff. No changed files were excluded from the review bundle.
To get this to a good state
Nothing is required.
ligmaSec
left a comment
There was a problem hiding this comment.
The trial merge onto c1601e56d5 was clean. The host-report change declares environ and continues to read it directly on Darwin. The adjacent device-fault fix in #16796 obtains the array via _NSGetEnviron(). Please confirm compilation and linking of HostReportSources.cpp on native macOS and consider using the same Darwin accessor so both environment reports follow the same platform contract. My review is source-based.
AI-assisted: yes.
What
Declare
environfor non-Windows builds inHostReportSources.cpp. The source reads this global on macOS, but<unistd.h>does not declare it there, so compilinglibSceAgcDriverfails with an undeclared identifier. This matches the declaration already used byPerformanceTrace.cppandFrameRecorder.cpp. Fixes #14371.Tested
Not run locally. This change is queued for Hosted CI.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)