[gnome-nettool] Fix build on GNU/kFreeBSD, bug #602490.
- From: Josselin Mouette <jmouette src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-nettool] Fix build on GNU/kFreeBSD, bug #602490.
- Date: Sat, 21 Nov 2009 08:53:26 +0000 (UTC)
commit 940a9f18fed0670d70c8f284c1625576bb1a6d49
Author: Josselin Mouette <joss debian org>
Date: Sat Nov 21 09:51:57 2009 +0100
Fix build on GNU/kFreeBSD, bug #602490.
src/netstat.c | 16 ++++++++--------
src/netstat.h | 2 +-
src/ping.h | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/netstat.c b/src/netstat.c
index 75a7bc1..6db508a 100644
--- a/src/netstat.c
+++ b/src/netstat.c
@@ -123,7 +123,7 @@ netstat_get_active_option (Netinfo * netinfo)
}
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
/* Only works for Solaris */
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
option = g_strdup ("-a -f inet -ln");
#else
if (netinfo_is_ipv6_enable ()) {
@@ -292,7 +292,7 @@ netstat_protocol_tree_insert (GtkTreeView *widget, gchar *line)
g_return_if_fail (line != NULL);
count = strip_protocol_line (line, &data);
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
if (count == 5 || count == 6 || count == 9 || count == 10) {
#else
if (count == 5 || count == 6) {
@@ -360,7 +360,7 @@ static gint
strip_protocol_line (gchar * line, netstat_protocol_data *data)
{
gint count = 0;
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
gint a1, a2, a3, a4;
gchar s9[30];
#else
@@ -371,7 +371,7 @@ strip_protocol_line (gchar * line, netstat_protocol_data *data)
/*line = g_strdelimit (line, ":", ' ');*/
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
line = g_strdelimit (line, ":", ' ');
count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
@@ -485,7 +485,7 @@ netstat_route_tree_insert (GtkTreeView *widget, gchar *line)
g_return_if_fail (line != NULL);
count = strip_route_line (line, &data);
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
if (count == 6) {
#else
if ((count == 8) || (count == 7)) {
@@ -562,7 +562,7 @@ strip_route_line (gchar * line, netstat_route_data *data)
gchar **items;
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
count = sscanf (line, NETSTAT_ROUTE_FORMAT,
data->destination,
data->gateway, flags,
@@ -605,7 +605,7 @@ netstat_create_route_model (GtkTreeView *widget)
renderer = gtk_cell_renderer_text_new ();
column =
gtk_tree_view_column_new_with_attributes
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
(_("Destination/Prefix"), renderer, "text", 0, NULL);
#else
(_("Destination"), renderer, "text", 0, NULL);
@@ -619,7 +619,7 @@ netstat_create_route_model (GtkTreeView *widget)
gtk_tree_view_column_set_alignment (column, 0.5);
gtk_tree_view_append_column (widget, column);
-#if ! (defined(__FreeBSD__) || defined(__OpenBSD__)) || defined(__NetBSD__) || defined(__DragonFly__)
+#if ! (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) || defined(__NetBSD__) || defined(__DragonFly__)
renderer = gtk_cell_renderer_text_new ();
column =
gtk_tree_view_column_new_with_attributes
diff --git a/src/netstat.h b/src/netstat.h
index db65e53..c6f7ec3 100644
--- a/src/netstat.h
+++ b/src/netstat.h
@@ -30,7 +30,7 @@
# define NETSTAT_ROUTE6_FORMAT "%s %s %s %d %d %d %s"
# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %d.%d.%d.%d.%s %s %s"
# define ALT_NETSTAT_PROTOCOL_FORMAT "%s %d %d *.%s %s %s"
# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s"
diff --git a/src/ping.h b/src/ping.h
index 8233efe..0d2e068 100644
--- a/src/ping.h
+++ b/src/ping.h
@@ -30,7 +30,7 @@
# define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
# define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
# define PING_PARAMS_6
-#elif defined(__OSF__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#elif defined(__OSF__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
/* <path to program> ping [-c <count>] -n <host> */
# define PING_PROGRAM_FORMAT "%s ping%s-n %s"
# define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]