Skip to content

build: add missing includes for GCC 16 compatibility#117

Open
mrgswift wants to merge 1 commit into
RPCSX:masterfrom
mrgswift:fix/gcc16-missing-includes
Open

build: add missing includes for GCC 16 compatibility#117
mrgswift wants to merge 1 commit into
RPCSX:masterfrom
mrgswift:fix/gcc16-missing-includes

Conversation

@mrgswift

@mrgswift mrgswift commented Jun 6, 2026

Copy link
Copy Markdown

Summary

Newer libstdc++ (as shipped with GCC 16) no longer transitively includes several headers that the codebase relies on, causing build failures. This adds explicit includes where the symbols are actually used:

  • <unistd.h> for ::dup2/::close in spv-gen.cpp, Device.cpp, AudioOut.cpp
  • <climits> for INT_MAX in SharedCV.hpp
  • <mutex> for std::lock_guard in vfs.cpp

Notes

These are purely additive include fixes — no behavioral changes. This fixes compile errors in newer libstdc++ versions that have tightened their transitive include graph.

   Newer libstdc++ no longer transitively includes these headers, causing
   build failures on GCC 16. Add explicit includes where the symbols are used:

   - <unistd.h> for ::dup2/::close in spv-gen.cpp, Device.cpp, AudioOut.cpp
   - <climits> for INT_MAX in SharedCV.hpp
   - <mutex> for std::lock_guard in vfs.cpp
@Darkhost1999

Copy link
Copy Markdown
Contributor

Was this tested on both master and dev branches? Just checking I won't be able to look at this info for the next 15 hours.

@mrgswift

mrgswift commented Jun 7, 2026

Copy link
Copy Markdown
Author

@Darkhost1999 I only tested this on master. These are basically my hotfix changes to get this to build and compile with GCC 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants