| Summary: | games/endless-sky: fix build with clang 18 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Dimitry Andric <dim> | ||||
| Component: | Individual Port(s) | Assignee: | Dmitry Marakasov <amdmi3> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Some People | Flags: | bugzilla:
maintainer-feedback?
(amdmi3) |
||||
| Priority: | --- | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 276104 | ||||||
| Attachments: |
|
||||||
Created attachment 249527 [details]
games/endless-sky: fix build with clang 18
Commit was somehow not attached to this pr: https://cgit.freebsd.org/ports/commit/?id=5887af366d3d0d54d0d8dea3b0ee34ae3104a0d0 Converted REINPLACE into patch for easier upstreaming. |
With clang 18, games/endless-sky fails to build: /wrkdirs/usr/ports/games/endless-sky/work/endless-sky-0.10.4/source/Audio.cpp:252:3: error: reference to 'queue' is ambiguous 252 | queue[it.first].Add(it.second); | ^ /usr/include/c++/v1/queue:301:28: note: candidate found by name lookup is 'std::queue' 301 | class _LIBCPP_TEMPLATE_VIS queue { | ^ /wrkdirs/usr/ports/games/endless-sky/work/endless-sky-0.10.4/source/Audio.cpp:85:33: note: candidate found by name lookup is '(anonymous namespace)::queue' 85 | map<const Sound *, QueueEntry> queue; | ^ This is because Audio.cpp contains "using namespace std;" and then the name 'queue' is already in use by the standard library. Fix it by renaming the local variable 'queue' to 'queue_'.