From: Jasper Lievisse Adriaanse Date: Fri, 27 Apr 2012 17:09:16 +0000 (+0200) Subject: Print the volume on OpenBSD too. Add missing library to Makefile accordingly. X-Git-Tag: 2.5~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aabac78fd0c5fa0ef3ec46080acc788a32a1ef9c;p=i3%2Fi3status Print the volume on OpenBSD too. Add missing library to Makefile accordingly. --- diff --git a/Makefile b/Makefile index 4e450cd..70d3728 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ endif ifeq ($(shell uname),OpenBSD) CFLAGS+=-I/usr/local/include/ LDFLAGS+=-L/usr/local/lib/ +LIBS+=-lossaudio endif CFLAGS+=$(EXTRA_CFLAGS) diff --git a/src/print_volume.c b/src/print_volume.c index bc14ed8..7b38e63 100644 --- a/src/print_volume.c +++ b/src/print_volume.c @@ -17,6 +17,12 @@ #include #endif +#ifdef __OpenBSD__ +#include +#include +#include +#endif + #include "i3status.h" #include "queue.h" @@ -166,7 +172,7 @@ void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char * } } #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__OpenBSD__) char mixerpath[] = "/dev/mixer"; int mixfd, vol, devmask = 0;