forked from jsonn/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull in some patches from OpenIndiana to fix the build on SunOS.
- Loading branch information
jperkin
committed
Apr 18, 2016
1 parent
8cb5cdc
commit 0994775
Showing
4 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
$NetBSD: distinfo,v 1.7 2015/11/04 00:35:02 agc Exp $ | ||
$NetBSD: distinfo,v 1.8 2016/04/18 12:14:29 jperkin Exp $ | ||
|
||
SHA1 (gnome-nettool-2.26.2.tar.bz2) = dcb026f358a5797793391e5a90ae74c8401a8fec | ||
RMD160 (gnome-nettool-2.26.2.tar.bz2) = 20b2145d8d616fbbac0c6081a0d508439a9b31f7 | ||
SHA512 (gnome-nettool-2.26.2.tar.bz2) = ec3165a4c4365feaff84d937474528135dc10fce5272214c3aa6508bfc53df04fb79ac30308983ff65533f52057167baaf02042c5595c39245bac5c73f57c9d1 | ||
Size (gnome-nettool-2.26.2.tar.bz2) = 631631 bytes | ||
SHA1 (patch-src_netstat.c) = c71285c56b565e40ed28681d62e24470eede49f0 | ||
SHA1 (patch-src_netstat.h) = e087a0ad253031889b6e29f9ab692bf532414657 | ||
SHA1 (patch-src_utils.h) = 29ec268988ada403627fe4f1f3c89572b0c3f22e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
$NetBSD: patch-src_netstat.c,v 1.1 2016/04/18 12:14:29 jperkin Exp $ | ||
|
||
Fix SunOS build, from OpenIndiana. | ||
|
||
--- src/netstat.c.orig 2009-05-20 00:56:41.000000000 +0000 | ||
+++ src/netstat.c | ||
@@ -112,9 +112,15 @@ netstat_get_active_option (Netinfo * net | ||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->routing))) { | ||
/* Works for Solaris and Linux */ | ||
if (netinfo_is_ipv6_enable ()) { | ||
+#ifdef __sun | ||
+ option = g_strdup ("-rn -f inet -f inet6"); | ||
+ } else { | ||
+ option = g_strdup ("-rn -f inet"); | ||
+#else | ||
option = g_strdup ("-rn -A inet -A inet6"); | ||
} else { | ||
option = g_strdup ("-rn -A inet"); | ||
+#endif | ||
} | ||
|
||
if (netinfo->stbar_text) | ||
@@ -125,7 +131,7 @@ netstat_get_active_option (Netinfo * net | ||
/* Only works for Solaris */ | ||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) | ||
option = g_strdup ("-a -f inet -ln"); | ||
-#else | ||
+#elif defined(__linux) | ||
if (netinfo_is_ipv6_enable ()) { | ||
option = g_strdup ("-A inet -A inet6 -ln"); | ||
} else { | ||
@@ -541,7 +547,11 @@ netstat_route_tree_insert (GtkTreeView * | ||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, | ||
0, data.destination, | ||
1, data.gateway, | ||
+#ifdef __sun | ||
+ 2, NULL, | ||
+#else | ||
2, data.netmask, | ||
+#endif | ||
3, data.iface, -1); | ||
|
||
gtk_tree_view_set_model (widget, model); | ||
@@ -562,7 +572,7 @@ strip_route_line (gchar * line, netstat_ | ||
gchar **items; | ||
#endif | ||
|
||
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) | ||
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__sun) | ||
count = sscanf (line, NETSTAT_ROUTE_FORMAT, | ||
data->destination, | ||
data->gateway, flags, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
$NetBSD: patch-src_netstat.h,v 1.1 2016/04/18 12:14:29 jperkin Exp $ | ||
|
||
Fix SunOS build, from OpenIndiana. | ||
|
||
--- src/netstat.h.orig 2009-05-20 00:56:41.000000000 +0000 | ||
+++ src/netstat.h | ||
@@ -36,6 +36,12 @@ | ||
# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s" | ||
# define NETSTAT_MULTICAST_FORMAT "%s %d %s" | ||
|
||
+#elif defined(__sun) | ||
+# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %s %s %s" | ||
+# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s" | ||
+# define NETSTAT_ROUTE6_FORMAT "%s %s %s %d %d %d %s" | ||
+# define NETSTAT_MULTICAST_FORMAT "%s %s %d" | ||
+ | ||
#endif | ||
|
||
typedef enum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$NetBSD: patch-src_utils.h,v 1.1 2016/04/18 12:14:29 jperkin Exp $ | ||
|
||
Fix SunOS build, from OpenIndiana. | ||
|
||
--- src/utils.h.orig 2009-04-18 14:59:27.000000000 +0000 | ||
+++ src/utils.h | ||
@@ -29,6 +29,11 @@ | ||
# include <config.h> | ||
#endif | ||
|
||
+#ifdef __sun | ||
+#define gethostbyname2(name, domain) getipnodebyname((name), (domain), 0, &g_n_err_macro) | ||
+int g_n_err_macro; | ||
+#endif | ||
+ | ||
#if (GLIB_MINOR_VERSION < 2) | ||
|
||
# define _g_vsprintf vsprintf |