diff --git a/makefile b/makefile index 37ba9a7..1167827 100644 --- a/makefile +++ b/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 diff --git a/status.c b/status.c index 86b83d5..8699b97 100644 --- a/status.c +++ b/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, ...) {