Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2020 12:30:50 +0000 (UTC)
From:      =?UTF-8?Q?Stefan_E=c3=9fer?= <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r549579 - in head/net/openmdns: . files
Message-ID:  <202009221230.08MCUoqs078333@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Tue Sep 22 12:30:49 2020
New Revision: 549579
URL: https://svnweb.freebsd.org/changeset/ports/549579

Log:
  Fix build with -fno-common
  
  While here regenerate patch files with make makepatch.

Added:
  head/net/openmdns/files/patch-mdnsctl_mdnsctl.c   (contents, props changed)
  head/net/openmdns/files/patch-mdnsd_control.c   (contents, props changed)
  head/net/openmdns/files/patch-mdnsd_control.h   (contents, props changed)
  head/net/openmdns/files/patch-mdnsd_mdns.c   (contents, props changed)
  head/net/openmdns/files/patch-mdnsd_mdns.h   (contents, props changed)
  head/net/openmdns/files/patch-mdnsd_mdnsd.c   (contents, props changed)
  head/net/openmdns/files/patch-mdnsd_mdnsd.h   (contents, props changed)
Deleted:
  head/net/openmdns/files/patch-compat
Modified:
  head/net/openmdns/Makefile
  head/net/openmdns/files/mdnsd.in   (contents, props changed)

Modified: head/net/openmdns/Makefile
==============================================================================
--- head/net/openmdns/Makefile	Tue Sep 22 11:56:27 2020	(r549578)
+++ head/net/openmdns/Makefile	Tue Sep 22 12:30:49 2020	(r549579)
@@ -2,7 +2,7 @@
 
 PORTNAME=	openmdns
 DISTVERSION=	0.7
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net
 
 MAINTAINER=	ports@FreeBSD.org

Modified: head/net/openmdns/files/mdnsd.in
==============================================================================
--- head/net/openmdns/files/mdnsd.in	Tue Sep 22 11:56:27 2020	(r549578)
+++ head/net/openmdns/files/mdnsd.in	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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

Added: head/net/openmdns/files/patch-mdnsctl_mdnsctl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsctl_mdnsctl.c	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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);

Added: head/net/openmdns/files/patch-mdnsd_control.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsd_control.c	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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)
+ {

Added: head/net/openmdns/files/patch-mdnsd_control.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsd_control.h	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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,

Added: head/net/openmdns/files/patch-mdnsd_mdns.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsd_mdns.c	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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
+  */

Added: head/net/openmdns/files/patch-mdnsd_mdns.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsd_mdns.h	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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

Added: head/net/openmdns/files/patch-mdnsd_mdnsd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsd_mdnsd.c	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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();

Added: head/net/openmdns/files/patch-mdnsd_mdnsd.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openmdns/files/patch-mdnsd_mdnsd.h	Tue Sep 22 12:30:49 2020	(r549579)
@@ -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]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009221230.08MCUoqs078333>