diff options
author | Jasper Lievisse Adriaanse <jasper@humppa.nl> | 2012-04-27 19:09:16 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-04-29 11:13:29 +0200 |
commit | aabac78fd0c5fa0ef3ec46080acc788a32a1ef9c (patch) | |
tree | 204b9b1902699ab43f739658b4e5241b8eebc48d /src/print_volume.c | |
parent | 688d300646ad76c3ba014d57f06e7ed79bee25f9 (diff) |
Print the volume on OpenBSD too. Add missing library to Makefile accordingly.
Diffstat (limited to 'src/print_volume.c')
-rw-r--r-- | src/print_volume.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <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; |