From 9ac721c23fb640de2a6d1f84c84a79b2ccc26691 Mon Sep 17 00:00:00 2001 From: Ingo Feinerer Date: Sat, 9 May 2020 12:03:20 +0200 Subject: Use the sioctl_open(3) OpenBSD API to access vol Starting with OpenBSD 6.7 regular users cannot access raw audio devices anymore, for improved security. Instead use the sioctl_open(3) API to access and manipulate audio controls exposed by sndiod(8). On the first call a permanent connection is established with the running sndiod daemon, and call-back functions are registered which are triggered when audio controls are changed (e.g., a USB headset is attached) or when the volume is modified. On subsequent calls we poll for changes; if there are no volume changes this costs virtually nothing. Joint work with Alexandre Ratchov --- config.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 3b32b7c..d88695c 100644 --- a/config.mk +++ b/config.mk @@ -14,6 +14,7 @@ X11LIB = /usr/X11R6/lib CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os LDFLAGS = -L$(X11LIB) -s +# OpenBSD: add -lsndio LDLIBS = -lX11 # compiler and linker -- cgit v1.2.3