]> git.sur5r.net Git - i3/i3status/commitdiff
Print the volume on OpenBSD too. Add missing library to Makefile accordingly.
authorJasper Lievisse Adriaanse <jasper@humppa.nl>
Fri, 27 Apr 2012 17:09:16 +0000 (19:09 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 29 Apr 2012 09:13:29 +0000 (11:13 +0200)
Makefile
src/print_volume.c

index 4e450cd620b66dd37ad66cc8c75cbf8983e9dd01..70d37281034ee74aa35f8003e14f7b523f367bad 100644 (file)
--- 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)
index bc14ed878cca21704664a61beb9a943a1fa6c9a9..7b38e6343fdf35a0cbe741dfbee5b562955bda91 100644 (file)
 #include <sys/soundcard.h>
 #endif
 
+#ifdef __OpenBSD__
+#include <fcntl.h>
+#include <unistd.h>
+#include <soundcard.h>
+#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;