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.
master
ale 4 years ago
parent 2c70016a4a
commit ab7365cc31
  1. 5
      makefile
  2. 6
      status.c

@ -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 LDFLAGS = -L/usr/X11R6/lib -lX11
CC = gcc CC ?= gcc
PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man MANPREFIX = ${PREFIX}/share/man

@ -73,6 +73,7 @@ static const char * get_date (void)
return str; return str;
} }
#if defined( __linux__ )
static const char * get_battery (void) { static const char * get_battery (void) {
static char str[ELEMENT_SIZE] = {0}; static char str[ELEMENT_SIZE] = {0};
static int init = 1; static int init = 1;
@ -147,6 +148,11 @@ static const char * get_battery (void) {
} }
return str; return str;
} }
#elif defined( __OpenBSD__ )
static const char * get_battery (void) {
return "not supported";
}
#endif
void die(const char *fmt, ...) void die(const char *fmt, ...)
{ {

Loading…
Cancel
Save