diff options
Diffstat (limited to 'net/openmdns/files/patch-compat')
-rw-r--r-- | net/openmdns/files/patch-compat | 90 |
1 files changed, 0 insertions, 90 deletions
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(); |