summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichaelbuch12@gmail.com <michaelbuch12@gmail.com>2021-01-01 16:52:57 +0100
committerRafael Marçalo <raroma09@gmail.com>2022-10-27 12:58:13 +0100
commitcc0b22ed267ad99447049fdc07c5b5fee04c7f7c (patch)
tree3c1484ddbd587c815ae65baf2c38a649f08100fd
parent2964d35a2a837591c5b539f7f95a3a3dd360e086 (diff)
Make volume component work on FreeBSD
- Edit compile instructions - Reuse OpenBSD sndio implementation
-rw-r--r--components/volume.c2
-rw-r--r--config.def.h2
-rw-r--r--config.mk2
3 files changed, 3 insertions, 3 deletions
diff --git a/components/volume.c b/components/volume.c
index b6665da..32f7817 100644
--- a/components/volume.c
+++ b/components/volume.c
@@ -7,7 +7,7 @@
#include "../util.h"
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) | defined(__FreeBSD__)
#include <sys/queue.h>
#include <poll.h>
#include <sndio.h>
diff --git a/config.def.h b/config.def.h
index 93a875a..f76b60c 100644
--- a/config.def.h
+++ b/config.def.h
@@ -59,7 +59,7 @@ static const char unknown_str[] = "n/a";
* uptime system uptime NULL
* username username of current user NULL
* vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
- * NULL on OpenBSD
+ * NULL on OpenBSD/FreeBSD
* wifi_perc WiFi signal in percent interface name (wlan0)
* wifi_essid WiFi ESSID interface name (wlan0)
*/
diff --git a/config.mk b/config.mk
index 2516e6e..6cce683 100644
--- a/config.mk
+++ b/config.mk
@@ -15,7 +15,7 @@ CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os
LDFLAGS = -L$(X11LIB) -s
# OpenBSD: add -lsndio
-# FreeBSD: add -lkvm
+# FreeBSD: add -lkvm -lsndio
LDLIBS = -lX11
# compiler and linker