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:
Camden Dixie O'Brien 2022-10-14 19:11:45 +01:00
parent 1491d79b98
commit e7dc81cfad

5
main.c
View File

@ -31,6 +31,11 @@
#include <sys/stat.h>
#include <unistd.h>
#ifdef __OpenBSD__
int pledge(const char *, const char *);
int unveil(const char *, const char *);
#endif
#define HOST "::1"
#define PORT 7070