Skip to content

Commit e1b7cb1

Browse files
authored
sokol: fix errors for audio unsupported on OpenBSD (fix #26299) (#26305)
1 parent 0e098a9 commit e1b7cb1

9 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎examples/breakout/breakout.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// vtest build: !openbsd
12
import gg
23
import math
34
import rand

‎examples/sokol/sounds/melody.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// vtest build: !openbsd
12
import gg
23
import sokol.audio
34

‎examples/sokol/sounds/ogg_player.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// vtest build: !openbsd
12
import os
23
import time
34
import sokol.audio

‎examples/sokol/sounds/simple_bytebeat.v‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// vtest build: !openbsd
2+
13
// This program illustrates how to use sokol.audio in a simple console app, *without a gui*.
24
// See melody.v for an example of how it can be integrated into a graphics app.
35
import time

‎examples/sokol/sounds/simple_keyboard_synth.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// vtest build: !openbsd
12
import time
23
import math
34
import term

‎examples/sokol/sounds/simple_sin_tone_using_audio_push.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// vtest build: !sanitize-memory-clang // Fails compilation with: `ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line`
1+
// vtest build: !openbsd && !sanitize-memory-clang // Fails compilation with: `ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line`
22
// import log
33
import math
44
import time

‎examples/sokol/sounds/simple_sin_tones.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// vtest build: !sanitize-memory-clang // Fails compilation with: `ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line`
1+
// vtest build: !openbsd && !sanitize-memory-clang // Fails compilation with: `ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line`
22
import time
33
import math
44
import sokol.audio

‎examples/sokol/sounds/wav_player.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// vtest build: !openbsd
12
import os
23
import time
34
import sokol.audio

‎vlib/sokol/audio/audio.c.v‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ $if linux {
77
#include <alsa/asoundlib.h> # Please install the `libasound2-dev` package
88
}
99

10+
$if openbsd {
11+
$compile_error('sokol/audio not supported on OpenBSD')
12+
}
13+
1014
#flag -I @VEXEROOT/thirdparty/sokol
1115
// FreeBSD requires the audio/alsa-lib to be installed
1216
#flag freebsd -I/usr/local/include

0 commit comments

Comments
 (0)