diff options
| author | Roy Marples <roy@marples.name> | 2020-05-10 16:09:54 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-05-10 16:09:54 +0100 |
| commit | 8ec63e6a621b7f027121a31478450698641b84ba (patch) | |
| tree | c90effa39a8875fdf93f703bd9174a3d7e59dc77 /configure | |
| parent | 1608a3170735cc697625b2d472286ba95fc88a91 (diff) | |
| download | dhcpcd-8ec63e6a621b7f027121a31478450698641b84ba.tar.xz | |
privsep: Implement pledge(2) support as found on OpenBSD
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -663,6 +663,21 @@ EOF echo "no" fi rm -f _capsicum.c _capsicum + + printf "Testing for pledge ... " + cat <<EOF >_pledge.c +#include <unistd.h> +int main(void) { + return pledge("stdio", NULL); +} +EOF + if $XCC _pledge.c -o _pledge 2>&3; then + echo "yes" + echo "#define HAVE_PLEDGE" >>$CONFIG_H + else + echo "no" + fi + rm -f _pledge.c _pledge fi if [ "$OS" = linux ]; then |
