Hi (again),
here's a diff for nsh, openmdns, libgtop2 and wide-dhcp. I hope I got
the _KERNEL dance right... The only remaining offender seems to be
Zabbix.
Bonus strlcpy "fix" for openmdns.
OK? Comments?
Index: devel/libgtop2/Makefile
===================================================================
RCS file: /cvs/ports/devel/libgtop2/Makefile,v
retrieving revision 1.106
diff -u -p -r1.106 Makefile
--- devel/libgtop2/Makefile 19 Nov 2013 07:30:58 -0000 1.106
+++ devel/libgtop2/Makefile 26 Nov 2013 00:17:17 -0000
@@ -7,7 +7,7 @@ COMMENT= portable library for obtaining
GNOME_VERSION= 2.28.5
GNOME_PROJECT= libgtop
PKGNAME= libgtop2-${VERSION}
-REVISION= 2
+REVISION= 3
SHARED_LIBS= gtop-2.0 9.0 # .9.0
Index: devel/libgtop2/patches/patch-sysdeps_openbsd_netload_c
===================================================================
RCS file: /cvs/ports/devel/libgtop2/patches/patch-sysdeps_openbsd_netload_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-sysdeps_openbsd_netload_c
--- devel/libgtop2/patches/patch-sysdeps_openbsd_netload_c 16 Oct 2013
15:11:12 -0000 1.2
+++ devel/libgtop2/patches/patch-sysdeps_openbsd_netload_c 25 Nov 2013
23:51:06 -0000
@@ -1,16 +1,27 @@
$OpenBSD: patch-sysdeps_openbsd_netload_c,v 1.2 2013/10/16 15:11:12 ajacoutot
Exp $
+1. OpenBSD has if_var.h; we need access to now kernel-only structures
+
+2.
From 250666219659d721377613a916d8f166c2df93ee Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <[email protected]>
Date: Wed, 16 Oct 2013 15:09:16 +0000
Subject: OpenBSD: add missing header
--- sysdeps/openbsd/netload.c.orig Sat Jul 27 14:40:23 2013
-+++ sysdeps/openbsd/netload.c Fri Sep 6 19:11:28 2013
-@@ -42,6 +42,7 @@
++++ sysdeps/openbsd/netload.c Tue Nov 26 00:46:30 2013
+@@ -36,12 +36,13 @@
+
+ #include <sys/ioctl.h>
+
+-#ifdef HAVE_NET_IF_VAR_H
+ #include <net/if_var.h>
+-#endif
#include <netinet/in.h>
++#define _KERNEL
#include <netinet/in_var.h>
++#undef _KERNEL
+#include <netinet6/in6_var.h>
static const unsigned long _glibtop_sysdeps_netload =
Index: net/openmdns/Makefile
===================================================================
RCS file: /cvs/ports/net/openmdns/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- net/openmdns/Makefile 31 Oct 2013 21:12:13 -0000 1.11
+++ net/openmdns/Makefile 25 Nov 2013 22:34:17 -0000
@@ -3,7 +3,7 @@
COMMENT = MDNS/DNS-SD daemon
DISTNAME = openmdns-0.5
-REVISION = 3
+REVISION = 4
CATEGORIES = net
MAINTAINER = Gonzalo L. R. <[email protected]>
Index: net/openmdns/patches/patch-mdnsd_mdns_c
===================================================================
RCS file: net/openmdns/patches/patch-mdnsd_mdns_c
diff -N net/openmdns/patches/patch-mdnsd_mdns_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/openmdns/patches/patch-mdnsd_mdns_c 25 Nov 2013 22:32:40 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- mdnsd/mdns.c.orig Mon Nov 25 23:32:38 2013
++++ mdnsd/mdns.c Mon Nov 25 23:32:20 2013
+@@ -1091,7 +1091,7 @@ pge_new_workstation(struct iface *iface)
+ bzero(&ms, sizeof(ms));
+ ms.port = 9; /* workstation stuff */
+ (void)strlcpy(ms.app, "workstation", sizeof(ms.app));
+- (void)strlcpy(ms.proto, "tcp", sizeof(ms.app));
++ (void)strlcpy(ms.proto, "tcp", sizeof(ms.proto));
+ (void)strlcpy(myname, conf->myname, sizeof(myname));
+ /* Chomp .local suffix */
+ if ((cp = strchr(myname, '.')) != NULL)
Index: net/openmdns/patches/patch-mdnsd_mdnsd_h
===================================================================
RCS file: net/openmdns/patches/patch-mdnsd_mdnsd_h
diff -N net/openmdns/patches/patch-mdnsd_mdnsd_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/openmdns/patches/patch-mdnsd_mdnsd_h 25 Nov 2013 22:31:01 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- mdnsd/mdnsd.h.orig Mon Nov 25 23:30:58 2013
++++ mdnsd/mdnsd.h Mon Nov 25 23:30:10 2013
+@@ -19,6 +19,7 @@
+
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/tree.h>
+ #include <sys/types.h>
+ #include <net/if_arp.h>
+ #include <net/if.h>
Index: net/wide-dhcp/Makefile
===================================================================
RCS file: /cvs/ports/net/wide-dhcp/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- net/wide-dhcp/Makefile 10 May 2013 10:45:46 -0000 1.26
+++ net/wide-dhcp/Makefile 25 Nov 2013 23:49:11 -0000
@@ -5,7 +5,7 @@ NOT_FOR_ARCHS= ${LP64_ARCHS}
DISTNAME= dhcp-1.4.0p3
PKGNAME= wide-dhcp-1.4.0.3
-REVISION= 4
+REVISION= 5
CATEGORIES= net
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/
Index: net/wide-dhcp/patches/patch-server_getmac_c
===================================================================
RCS file: /cvs/ports/net/wide-dhcp/patches/patch-server_getmac_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-server_getmac_c
--- net/wide-dhcp/patches/patch-server_getmac_c 10 May 2013 09:56:45 -0000
1.1
+++ net/wide-dhcp/patches/patch-server_getmac_c 25 Nov 2013 23:41:32 -0000
@@ -1,7 +1,23 @@
$OpenBSD: patch-server_getmac_c,v 1.1 2013/05/10 09:56:45 sthen Exp $
---- server/getmac.c.orig Thu Sep 11 02:27:06 1997
-+++ server/getmac.c Fri May 10 10:49:50 2013
-@@ -85,14 +85,20 @@ getmac(ifname, result)
+--- server/getmac.c.orig Thu Sep 11 03:27:06 1997
++++ server/getmac.c Tue Nov 26 00:40:06 2013
+@@ -50,10 +50,15 @@ static char rcsid[] =
+ #include <net/if_var.h>
+ #endif
+ #endif
++#if defined(__OpenBSD__)
++#include <net/if_var.h>
++#endif
+
+ #include <netinet/in.h>
++#define _KERNEL
+ #include <netinet/in_var.h>
+ #include <netinet/if_ether.h>
++#undef _KERNEL
+ #include <arpa/inet.h>
+
+ /* Cast a struct sockaddr to a sockaddr_in */
+@@ -85,14 +90,20 @@ getmac(ifname, result)
struct in_ifaddr in;
} ifaddr;
u_long addr = 0;
@@ -22,7 +38,7 @@ $OpenBSD: patch-server_getmac_c,v 1.1 20
/* Open kernel memory for reading */
kd = kvm_open(0, 0, 0, O_RDONLY, "kvm_open");
-@@ -110,7 +116,7 @@ getmac(ifname, result)
+@@ -110,7 +121,7 @@ getmac(ifname, result)
ac = &arpcom;
ifp = &arpcom.ac_if;
@@ -31,7 +47,7 @@ $OpenBSD: patch-server_getmac_c,v 1.1 20
ep = arpcom.ac_enaddr;
#else
ep = arpcom.ac_enaddr.ether_addr_octet;
-@@ -124,7 +130,11 @@ getmac(ifname, result)
+@@ -124,7 +135,11 @@ getmac(ifname, result)
kvm_close(kd);
return(-1);
}
@@ -43,7 +59,7 @@ $OpenBSD: patch-server_getmac_c,v 1.1 20
if (kvm_read(kd, addr, (char *)ac, sizeof(*ac)) != sizeof(*ac)) {
syslog(LOG_ERR, "kvm_read() error in getmac(): %m");
kvm_close(kd);
-@@ -135,6 +145,10 @@ getmac(ifname, result)
+@@ -135,6 +150,10 @@ getmac(ifname, result)
continue;
/* Only look at the specified interface */
@@ -54,7 +70,7 @@ $OpenBSD: patch-server_getmac_c,v 1.1 20
if (kvm_read(kd, (u_long)ifp->if_name, (char *)name, sizeof(name)) !=
sizeof(name)) {
syslog(LOG_ERR, "kvm_read() error in getmac(): %m");
-@@ -145,6 +159,7 @@ getmac(ifname, result)
+@@ -145,6 +164,7 @@ getmac(ifname, result)
sprintf(fullname, "%s%d", name, ifp->if_unit);
if (strcmp(fullname, ifname) != 0)
continue;
Index: shells/nsh/Makefile
===================================================================
RCS file: /cvs/ports/shells/nsh/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- shells/nsh/Makefile 31 Oct 2013 21:12:13 -0000 1.5
+++ shells/nsh/Makefile 26 Nov 2013 00:06:39 -0000
@@ -3,7 +3,7 @@
COMMENT = network switch style shell
DISTNAME = nsh-1.0
-REVISION = 1
+REVISION = 2
CATEGORIES = shells net
HOMEPAGE = http://www.nmedia.net/nsh/
Index: shells/nsh/patches/patch-conf_c
===================================================================
RCS file: shells/nsh/patches/patch-conf_c
diff -N shells/nsh/patches/patch-conf_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ shells/nsh/patches/patch-conf_c 26 Nov 2013 00:05:12 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- conf.c.orig Tue Nov 26 01:01:40 2013
++++ conf.c Tue Nov 26 01:02:08 2013
+@@ -29,6 +29,7 @@
+ #include <sys/stat.h>
+ #include <sys/limits.h>
+ #include <net/if.h>
++#include <net/if_var.h>
+ #include <net/if_types.h>
+ #include <netinet/in.h>
+ #include <netinet/if_ether.h>
Index: shells/nsh/patches/patch-if_c
===================================================================
RCS file: shells/nsh/patches/patch-if_c
diff -N shells/nsh/patches/patch-if_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ shells/nsh/patches/patch-if_c 25 Nov 2013 23:59:13 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- if.c.orig Tue Nov 26 00:58:52 2013
++++ if.c Tue Nov 26 00:59:06 2013
+@@ -26,6 +26,7 @@
+ #include <sys/sockio.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
++#include <net/if_var.h>
+ #include <net/if_types.h>
+ #include <net/if_dl.h>
+ #include <net/route.h>
Index: shells/nsh/patches/patch-sysctl_c
===================================================================
RCS file: shells/nsh/patches/patch-sysctl_c
diff -N shells/nsh/patches/patch-sysctl_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ shells/nsh/patches/patch-sysctl_c 26 Nov 2013 00:05:12 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- sysctl.c.orig Tue Nov 26 01:05:08 2013
++++ sysctl.c Tue Nov 26 01:03:56 2013
+@@ -23,6 +23,9 @@
+ #include <sys/sysctl.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
++#define _KERNEL
++#include <net/if_var.h>
++#undef _KERNEL
+ #include <net/pipex.h>
+ #include <netinet/in.h>
+ #include <netinet/ip_ether.h>