diff --git a/Makefile b/Makefile index cd234f6..8013f37 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ +include config.mk + PREFIX?=/usr/local/ CFLAGS += -pedantic -Wall -Wextra -Wmissing-prototypes \ - -Wstrict-prototypes -Wwrite-strings + -Wstrict-prototypes -Wwrite-strings ${EXTRAFLAGS} .SUFFIXES: .c .o diff --git a/README.md b/README.md index 980bbe6..233d45e 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,12 @@ For all supported OS, it's possible to run **Vger** in a chroot and drop privile ``` git clone https://tildegit.org/solene/vger.git cd vger +./configure (only really useful for Linux) make doas make install ``` -On GNU/Linux, make sure you installed `libbsd`. +On GNU/Linux, make sure you installed `libbsd`, it has been reported that using clang was required too. # Running tests diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..2c254b2 --- /dev/null +++ b/config.mk @@ -0,0 +1 @@ +EXTRAFLAGS= diff --git a/utils.c b/utils.c index 2b9bd28..7e7ca42 100644 --- a/utils.c +++ b/utils.c @@ -3,12 +3,17 @@ #include #include #include -#include #include #include #include "utils.h" +#ifdef __OpenBSD__ +#include +#else +#include +#endif + #ifdef __OpenBSD__ void eunveil(const char *path, const char *permissions)