summaryrefslogtreecommitdiffstats
path: root/src/privsep-root.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-05-30 14:50:25 +0000
committerRoy Marples <roy@marples.name>2020-05-30 14:50:25 +0000
commitc3358e3e0c8c19e5a9110140dd2b099a612afd43 (patch)
tree94992860dcb6370c37ec158d7180649c18a2d95c /src/privsep-root.c
parent422de9e23a64eef17d9049c16925677fca64ad9f (diff)
downloaddhcpcd-c3358e3e0c8c19e5a9110140dd2b099a612afd43.tar.xz
Fix compile with inet or inet6 disabled
Diffstat (limited to 'src/privsep-root.c')
-rw-r--r--src/privsep-root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/privsep-root.c b/src/privsep-root.c
index 5884357a..affcf3c6 100644
--- a/src/privsep-root.c
+++ b/src/privsep-root.c
@@ -526,7 +526,7 @@ ps_root_recvmsgcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg)
free_rdata = true;
break;
#endif
-#if defined(__linux__) || defined(HAVE_PLEDGE)
+#if defined(INET6) && (defined(__linux__) || defined(HAVE_PLEDGE))
case PS_IP6FORWARDING:
err = ip6_forwarding(data);
break;
@@ -694,8 +694,8 @@ ps_root_dispatchcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg)
break;
#endif
default:
- err = ps_bpf_dispatch(ctx, psm, msg);
#ifdef INET
+ err = ps_bpf_dispatch(ctx, psm, msg);
if (err == -1 && errno == ENOTSUP)
#endif
err = ps_inet_dispatch(ctx, psm, msg);