Skip to content

sokol: fix errors for audio unsupported on OpenBSD#26305

Merged
spytheman merged 2 commits into
vlang:masterfrom
lcheylus:openbsd-sokol_audio
Jan 10, 2026
Merged

sokol: fix errors for audio unsupported on OpenBSD#26305
spytheman merged 2 commits into
vlang:masterfrom
lcheylus:openbsd-sokol_audio

Conversation

@lcheylus

@lcheylus lcheylus commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Fix #26299

  • Add an error message at comptime for sokol/audio not supported on OpenBSD
  • Disable examples on OpenBSD that uses sokol/audio : examples/breakout/breakout.v and examples/sokol/sounds/*.v

./v build-examples OK on Linux/amd64 and OpenBSD/amd64.

Error message when building example using sokol/audio on OpenBSD:

$ ./v run examples/breakout/breakout.v
vlib/sokol/audio/audio.c.v:11:2: error: sokol/audio not supported on OpenBSD
    9 |
   10 | $if openbsd {
   11 |     $compile_error('sokol/audio not supported on OpenBSD')
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   12 | }
   13 |

Signed-off-by: Laurent Cheylus <foxy@free.fr>
Signed-off-by: Laurent Cheylus <foxy@free.fr>

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unfortunate, that sokol does not support openbsd yet ...

Thank you @lcheylus 🙇🏻 .
Excellent work.

@spytheman spytheman merged commit e1b7cb1 into vlang:master Jan 10, 2026
73 checks passed
@lcheylus lcheylus deleted the openbsd-sokol_audio branch January 10, 2026 09:29
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.

sokol/audio not supported on OpenBSD

2 participants