Add a configure script to make compiling on Linux easier

This commit is contained in:
Solene Rapenne 2021-03-14 14:18:06 +01:00
parent 02d2d1dc7d
commit 807d1b8409
4 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,8 @@
include config.mk
PREFIX?=/usr/local/ PREFIX?=/usr/local/
CFLAGS += -pedantic -Wall -Wextra -Wmissing-prototypes \ CFLAGS += -pedantic -Wall -Wextra -Wmissing-prototypes \
-Wstrict-prototypes -Wwrite-strings -Wstrict-prototypes -Wwrite-strings ${EXTRAFLAGS}
.SUFFIXES: .c .o .SUFFIXES: .c .o

View file

@ -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 git clone https://tildegit.org/solene/vger.git
cd vger cd vger
./configure (only really useful for Linux)
make make
doas make install 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 # Running tests

1
config.mk Normal file
View file

@ -0,0 +1 @@
EXTRAFLAGS=

View file

@ -3,12 +3,17 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <syslog.h> #include <syslog.h>
#include <unistd.h> #include <unistd.h>
#include "utils.h" #include "utils.h"
#ifdef __OpenBSD__
#include <string.h>
#else
#include <bsd/string.h>
#endif
#ifdef __OpenBSD__ #ifdef __OpenBSD__
void void
eunveil(const char *path, const char *permissions) eunveil(const char *path, const char *permissions)