Forward-declare pledge() and unveil() on OpenBSD
These are declared in unistd.h, but since _POSIX_SOURCE is defined they are not visible. Conditionally duplicating the declarations here seems less likely to bite me in the ass later on than making a bunch of other BSD-specific things visible.
This commit is contained in:
parent
1491d79b98
commit
e7dc81cfad
5
main.c
5
main.c
@ -31,6 +31,11 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef __OpenBSD__
|
||||||
|
int pledge(const char *, const char *);
|
||||||
|
int unveil(const char *, const char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HOST "::1"
|
#define HOST "::1"
|
||||||
#define PORT 7070
|
#define PORT 7070
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user