ports/net/isc-bind/patches/patch-lib_isc_net_c

20 lines
408 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Patch to use pledge on OpenBSD.
Index: lib/isc/net.c
--- lib/isc/net.c.orig
+++ lib/isc/net.c
@@ -216,6 +216,13 @@ isc_net_probeunix(void) {
static void
try_ipv6only(void) {
+#ifdef __OpenBSD__
+/*
+ * pledge doesn't allow setting IPV6_V6ONLY, but that's ok,
+ * IPV6_V6ONLY is always enabled on OpenBSD;
+ */
+#undef IPV6_V6ONLY
+#endif
#ifdef IPV6_V6ONLY
int s, on;
#endif /* ifdef IPV6_V6ONLY */