Add a configure script to make compiling on Linux easier
This commit is contained in:
parent
02d2d1dc7d
commit
807d1b8409
4 changed files with 12 additions and 3 deletions
4
Makefile
4
Makefile
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
1
config.mk
Normal file
|
@ -0,0 +1 @@
|
||||||
|
EXTRAFLAGS=
|
7
utils.c
7
utils.c
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue