aboutsummaryrefslogtreecommitdiff
path: root/net
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
parentaf5c72ccd0319187bda6fd117b1a3c87e4e03394 (diff)
downloadports-a354eb966508761e6c68b4249e647a5905027cf7.tar.gz
ports-a354eb966508761e6c68b4249e647a5905027cf7.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/openmdns/Makefile2
-rw-r--r--net/openmdns/files/mdnsd.in2
-rw-r--r--net/openmdns/files/patch-compat90
-rw-r--r--net/openmdns/files/patch-mdnsctl_mdnsctl.c24
-rw-r--r--net/openmdns/files/patch-mdnsd_control.c11
-rw-r--r--net/openmdns/files/patch-mdnsd_control.h17
-rw-r--r--net/openmdns/files/patch-mdnsd_mdns.c12
-rw-r--r--net/openmdns/files/patch-mdnsd_mdns.h44
-rw-r--r--net/openmdns/files/patch-mdnsd_mdnsd.c25
-rw-r--r--net/openmdns/files/patch-mdnsd_mdnsd.h27
10 files changed, 162 insertions, 92 deletions
diff --git a/net/openmdns/Makefile b/net/openmdns/Makefile
index 6ae4ff61cf7d..fd1cf88f052c 100644
--- a/net/openmdns/Makefile
+++ b/net/openmdns/Makefile
@@ -2,7 +2,7 @@
PORTNAME= openmdns
DISTVERSION= 0.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MAINTAINER= ports@FreeBSD.org
diff --git a/net/openmdns/files/mdnsd.in b/net/openmdns/files/mdnsd.in
index 824e09d0e0bf..354d13c34073 100644
--- a/net/openmdns/files/mdnsd.in
+++ b/net/openmdns/files/mdnsd.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD$
+# $FreeBSD: head/net/openmdns/files/mdnsd.in 478837 2018-09-03 00:21:45Z jbeich $
#
# PROVIDE: mdnsd
# REQUIRE: NETWORKING
diff --git a/net/openmdns/files/patch-compat b/net/openmdns/files/patch-compat
deleted file mode 100644
index fee6e4a001b1..000000000000
--- a/net/openmdns/files/patch-compat
+++ /dev/null
@@ -1,90 +0,0 @@
---- mdnsctl/mdnsctl.c.orig 2017-02-18 03:02:15 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);
---- mdnsd/mdns.h.orig 2017-02-18 03:02:15 UTC
-+++ mdnsd/mdns.h
-@@ -31,6 +31,41 @@
- #include <event.h>
- #include <string.h>
-
-+#ifndef T_NSEC
-+#define T_NSEC 47 /* from OpenBSD */
-+#endif
-+
-+#ifndef IFT_CARP
-+#define IFT_CARP 0xf8 /* from DragonFly and NetBSD */
-+#endif
-+
-+#ifndef LINK_STATE_IS_UP /* from DragonFly and OpenBSD */
-+#define LINK_STATE_IS_UP(_s) ((_s) >= LINK_STATE_UP)
-+#endif
-+
-+#ifndef LIST_FOREACH_SAFE /* DragonFly */
-+#define LIST_FOREACH_SAFE LIST_FOREACH_MUTABLE
-+#endif
-+
-+/* Copied from <sys/time.h> on OpenBSD */
-+#ifndef timespeccmp
-+#define timespeccmp(tsp, usp, cmp) \
-+ (((tsp)->tv_sec == (usp)->tv_sec) ? \
-+ ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
-+ ((tsp)->tv_sec cmp (usp)->tv_sec))
-+#endif
-+#ifndef timespecsub
-+#define timespecsub(tsp, usp, vsp) \
-+ do { \
-+ (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
-+ (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
-+ if ((vsp)->tv_nsec < 0) { \
-+ (vsp)->tv_sec--; \
-+ (vsp)->tv_nsec += 1000000000L; \
-+ } \
-+ } while (0)
-+#endif
-+
- #define MAXCHARSTR MAXHOSTNAMELEN
- #define MAXLABELLEN 64
- #define MAXPROTOLEN 4
---- mdnsd/mdnsd.c.orig 2017-02-18 03:02:15 UTC
-+++ mdnsd/mdnsd.c
-@@ -46,7 +46,9 @@ void fetchmyname(char [MAXHOSTNAMELEN])
- void fetchhinfo(struct hinfo *);
-
- struct mdnsd_conf *conf = NULL;
-+#ifdef __OpenBSD__
- extern char *malloc_options;
-+#endif
-
- __dead void
- usage(void)
-@@ -230,7 +232,9 @@ main(int argc, char *argv[])
- switch (ch) {
- case 'd':
- debug = 1;
-+#ifdef __OpenBSD__
- malloc_options = "AFGJPX";
-+#endif
- break;
- case 'v':
- display_version();
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);
diff --git a/net/openmdns/files/patch-mdnsd_control.c b/net/openmdns/files/patch-mdnsd_control.c
new file mode 100644
index 000000000000..6eeafec2efc5
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsd_control.c
@@ -0,0 +1,11 @@
+--- mdnsd/control.c.orig 2017-03-10 09:24:12 UTC
++++ mdnsd/control.c
+@@ -53,6 +53,8 @@ void control_group_add_service(struct ctl_conn *, st
+
+ extern struct mdnsd_conf *conf;
+
++struct control_state control_state;
++
+ void
+ control_lookup(struct ctl_conn *c, struct imsg *imsg)
+ {
diff --git a/net/openmdns/files/patch-mdnsd_control.h b/net/openmdns/files/patch-mdnsd_control.h
new file mode 100644
index 000000000000..ab1eda7844b2
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsd_control.h
@@ -0,0 +1,17 @@
+--- mdnsd/control.h.orig 2017-03-10 09:24:12 UTC
++++ mdnsd/control.h
+@@ -26,10 +26,12 @@
+
+ #include "mdnsd.h"
+
+-struct {
++struct control_state {
+ struct event ev;
+ int fd;
+-} control_state;
++};
++
++extern struct control_state control_state;
+
+ enum blockmodes {
+ BM_NORMAL,
diff --git a/net/openmdns/files/patch-mdnsd_mdns.c b/net/openmdns/files/patch-mdnsd_mdns.c
new file mode 100644
index 000000000000..51033c03b314
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsd_mdns.c
@@ -0,0 +1,12 @@
+--- mdnsd/mdns.c.orig 2017-03-10 09:24:12 UTC
++++ mdnsd/mdns.c
+@@ -45,6 +45,9 @@ extern struct mdnsd_conf *conf;
+ struct question_tree question_tree;
+ struct cache_tree cache_tree;
+
++pg_q pg_queue;
++pge_q pge_queue;
++
+ /*
+ * RR cache
+ */
diff --git a/net/openmdns/files/patch-mdnsd_mdns.h b/net/openmdns/files/patch-mdnsd_mdns.h
new file mode 100644
index 000000000000..42d24a0e930f
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsd_mdns.h
@@ -0,0 +1,44 @@
+--- mdnsd/mdns.h.orig 2017-03-10 09:24:12 UTC
++++ mdnsd/mdns.h
+@@ -31,6 +31,41 @@
+ #include <event.h>
+ #include <string.h>
+
++#ifndef T_NSEC
++#define T_NSEC 47 /* from OpenBSD */
++#endif
++
++#ifndef IFT_CARP
++#define IFT_CARP 0xf8 /* from DragonFly and NetBSD */
++#endif
++
++#ifndef LINK_STATE_IS_UP /* from DragonFly and OpenBSD */
++#define LINK_STATE_IS_UP(_s) ((_s) >= LINK_STATE_UP)
++#endif
++
++#ifndef LIST_FOREACH_SAFE /* DragonFly */
++#define LIST_FOREACH_SAFE LIST_FOREACH_MUTABLE
++#endif
++
++/* Copied from <sys/time.h> on OpenBSD */
++#ifndef timespeccmp
++#define timespeccmp(tsp, usp, cmp) \
++ (((tsp)->tv_sec == (usp)->tv_sec) ? \
++ ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
++ ((tsp)->tv_sec cmp (usp)->tv_sec))
++#endif
++#ifndef timespecsub
++#define timespecsub(tsp, usp, vsp) \
++ do { \
++ (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
++ (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
++ if ((vsp)->tv_nsec < 0) { \
++ (vsp)->tv_sec--; \
++ (vsp)->tv_nsec += 1000000000L; \
++ } \
++ } while (0)
++#endif
++
+ #define MAXCHARSTR MAXHOSTNAMELEN
+ #define MAXLABELLEN 64
+ #define MAXPROTOLEN 4
diff --git a/net/openmdns/files/patch-mdnsd_mdnsd.c b/net/openmdns/files/patch-mdnsd_mdnsd.c
new file mode 100644
index 000000000000..afb138cae4b0
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsd_mdnsd.c
@@ -0,0 +1,25 @@
+--- mdnsd/mdnsd.c.orig 2017-03-10 09:24:12 UTC
++++ mdnsd/mdnsd.c
+@@ -45,8 +45,12 @@ int mdns_sock(void);
+ void fetchmyname(char [MAXHOSTNAMELEN]);
+ void fetchhinfo(struct hinfo *);
+
++ctl_conns_t ctl_conns;
++
+ struct mdnsd_conf *conf = NULL;
++#ifdef __OpenBSD__
+ extern char *malloc_options;
++#endif
+
+ __dead void
+ usage(void)
+@@ -230,7 +234,9 @@ main(int argc, char *argv[])
+ switch (ch) {
+ case 'd':
+ debug = 1;
++#ifdef __OpenBSD__
+ malloc_options = "AFGJPX";
++#endif
+ break;
+ case 'v':
+ display_version();
diff --git a/net/openmdns/files/patch-mdnsd_mdnsd.h b/net/openmdns/files/patch-mdnsd_mdnsd.h
new file mode 100644
index 000000000000..b22f5dc2692d
--- /dev/null
+++ b/net/openmdns/files/patch-mdnsd_mdnsd.h
@@ -0,0 +1,27 @@
+--- mdnsd/mdnsd.h.orig 2017-03-10 09:24:12 UTC
++++ mdnsd/mdnsd.h
+@@ -223,9 +223,12 @@ struct pge {
+ };
+
+ /* Publish Group Queue, should hold all publishing groups */
+-TAILQ_HEAD(, pg) pg_queue;
++typedef TAILQ_HEAD(, pg) pg_q;
++extern pg_q pg_queue;
++
+ /* Publish Group Entry Queue, should hold all publishing group entries */
+-TAILQ_HEAD(, pge) pge_queue;
++typedef TAILQ_HEAD(, pge) pge_q;
++extern pge_q pge_queue;
+
+ struct kif {
+ char ifname[IF_NAMESIZE];
+@@ -397,7 +400,8 @@ int rr_send_an(struct rr *);
+ void conflict_resolve_by_rr(struct rr *);
+
+ /* control.c */
+-TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conns;
++typedef TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conns_t;
++extern ctl_conns_t ctl_conns;
+ int control_send_rr(struct ctl_conn *, struct rr *, int);
+ int control_send_ms(struct ctl_conn *, struct mdns_service *, int);
+ int control_try_answer_ms(struct ctl_conn *, char[MAXHOSTNAMELEN]);