Skip to content

Add missing <optional> include to drm.h - #2033

Open
oadlebai wants to merge 1 commit into
moonlight-stream:masterfrom
oadlebai:fix-drm-missing-optional-include
Open

oadlebai wants to merge 1 commit into
moonlight-stream:masterfrom
oadlebai:fix-drm-missing-optional-include

Conversation

@oadlebai

@oadlebai oadlebai commented Oct 5, 2026

Copy link
Copy Markdown

DrmRenderer::DrmProperty uses std::optional but drm.h never includes <optional>, relying on it being pulled in transitively by another header. That isn't guaranteed and fails to compile with GCC 13 / libstdc++ on aarch64:

drm.h:89:14: error: 'optional' in namespace 'std' does not name a template type
   89 |         std::optional<std::pair<uint64_t, uint64_t>> range() const {
drm.h:16:1: note: 'std::optional' is defined in header '<optional>'; did you forget to '#include <optional>'?

The sibling header eglimagefactory.h already includes <optional> explicitly for the same reason. This adds the include to drm.h alongside the other standard-library headers.

DrmRenderer::DrmProperty uses std::optional but drm.h relied on it being
pulled in transitively by another header. This isn't guaranteed and fails
to compile with GCC 13 / libstdc++ on aarch64:

    drm.h:89:14: error: 'optional' in namespace 'std' does not name a template type

Include <optional> explicitly alongside the other standard-library headers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant