compatible with openbsd
made the makefile compatible with openbsd, also since battery status is not exposed trough the filesystem, just printing "not supported" for now.
This commit is contained in:
parent
2c70016a4a
commit
ab7365cc31
5
makefile
5
makefile
@ -1,6 +1,7 @@
|
||||
CFLAGS = -Wall -Werror -pedantic -Ofast -std=c99
|
||||
INCS = -I/usr/X11R6/include
|
||||
CFLAGS = -Wall -Werror -pedantic -Ofast -std=c99 ${INCS}
|
||||
LDFLAGS = -L/usr/X11R6/lib -lX11
|
||||
CC = gcc
|
||||
CC ?= gcc
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
|
6
status.c
6
status.c
@ -73,6 +73,7 @@ static const char * get_date (void)
|
||||
return str;
|
||||
}
|
||||
|
||||
#if defined( __linux__ )
|
||||
static const char * get_battery (void) {
|
||||
static char str[ELEMENT_SIZE] = {0};
|
||||
static int init = 1;
|
||||
@ -147,6 +148,11 @@ static const char * get_battery (void) {
|
||||
}
|
||||
return str;
|
||||
}
|
||||
#elif defined( __OpenBSD__ )
|
||||
static const char * get_battery (void) {
|
||||
return "not supported";
|
||||
}
|
||||
#endif
|
||||
|
||||
void die(const char *fmt, ...)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user