Print the volume on OpenBSD too. Add missing library to Makefile accordingly.

This commit is contained in:
Jasper Lievisse Adriaanse 2012-04-27 19:09:16 +02:00 committed by Michael Stapelberg
parent 688d300646
commit aabac78fd0
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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;