summaryrefslogtreecommitdiff
path: root/net/openmdns/files/patch-mdnsctl_mdnsctl.c
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-09-22 12:30:49 +0000
committerStefan Eßer <se@FreeBSD.org>2020-09-22 12:30:49 +0000
commita354eb966508761e6c68b4249e647a5905027cf7 (patch)
tree06ade4624b4630b5f2d61e8fddbfa1a3e0a9451e /net/openmdns/files/patch-mdnsctl_mdnsctl.c
parentFix build with -fno-common (diff)
Fix build with -fno-common
While here regenerate patch files with make makepatch.
Diffstat (limited to 'net/openmdns/files/patch-mdnsctl_mdnsctl.c')
-rw-r--r--net/openmdns/files/patch-mdnsctl_mdnsctl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/openmdns/files/patch-mdnsctl_mdnsctl.c b/net/openmdns/files/patch-mdnsctl_mdnsctl.c
new file mode 100644
index 000000000000..1b4880dd91a6
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsctl_mdnsctl.c
@@ -0,0 +1,24 @@
+--- mdnsctl/mdnsctl.c.orig 2017-03-10 09:24:12 UTC
++++ mdnsctl/mdnsctl.c
+@@ -67,8 +67,10 @@ main(int argc, char *argv[])
+ struct mdns mdns;
+ struct mdns_service ms;
+
++#ifdef __OpenBSD__
+ if (pledge("stdio unix", NULL) == -1)
+ err(1, NULL);
++#endif
+
+ /* parse options */
+ if ((res = parse(argc - 1, argv + 1)) == NULL)
+@@ -77,8 +79,10 @@ main(int argc, char *argv[])
+ if ((sockfd = mdns_open(&mdns)) == -1)
+ err(1, "mdns_open");
+
++#ifdef __OpenBSD__
+ if (pledge("stdio", NULL) == -1)
+ err(1, NULL);
++#endif
+
+ mdns_set_lookup_A_hook(&mdns, my_lookup_A_hook);
+ mdns_set_lookup_PTR_hook(&mdns, my_lookup_PTR_hook);