Ethereal-dev: [Ethereal-dev] 0.10.3 portability patches

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Albert Chin <ethereal-dev@xxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Mar 2004 12:47:02 -0600
1. [wiretap/wtap.c, packet-smb-mailslot.c]
   "config.h" should always come before any other #include files.
2. [plugins/rudp/packet-rudp.c]
   The Sun WorkShop 5.0 compiler and the HP-UX 10.20 compiler don't
   allow initializing with a non-constant value.
3. [Makefile.am]
   Link order is important on IRIX. If -la depends on -lb, then you
   must link with -lb -la.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

-- snip snip
--- wiretap/wtap.c.orig	2004-03-29 23:43:34.732395000 -0600
+++ wiretap/wtap.c	2004-03-29 23:43:41.731132000 -0600
@@ -20,12 +20,13 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-#include <string.h>
-#include <errno.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
+#include <string.h>
+#include <errno.h>
+
 #include "wtap-int.h"
 #include "file_wrappers.h"
 #include "buffer.h"
--- packet-smb-mailslot.c.orig	2004-03-30 09:35:01.454999000 -0600
+++ packet-smb-mailslot.c	2004-03-30 09:35:27.344473000 -0600
@@ -25,6 +25,10 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <string.h>
 #include "packet-smb-common.h"
 #include "packet-smb-mailslot.h"
--- plugins/rudp/packet-rudp.c.orig	2004-03-30 09:45:30.552722000 -0600
+++ plugins/rudp/packet-rudp.c	2004-03-30 09:45:35.852459000 -0600
@@ -83,12 +83,19 @@
 	tvbuff_t * next_tvb = NULL;
 	proto_tree *rudp_tree = NULL, *flags_tree;
 	proto_item *ti = NULL;
-	int flags[] = { hf_rudp_flags_syn, hf_rudp_flags_ack, hf_rudp_flags_eak,
-		       	hf_rudp_flags_rst, hf_rudp_flags_nul, hf_rudp_flags_chk,
-		       	hf_rudp_flags_tcs, hf_rudp_flags_0 };
+	int flags[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 	int i;
 	guint8 hlen;
 
+	flags[0] = hf_rudp_flags_syn;
+	flags[1] = hf_rudp_flags_ack;
+	flags[2] = hf_rudp_flags_eak;
+	flags[3] = hf_rudp_flags_rst;
+	flags[4] = hf_rudp_flags_nul;
+	flags[5] = hf_rudp_flags_chk;
+	flags[6] = hf_rudp_flags_tcs;
+	flags[7] = hf_rudp_flags_0;
+
 	hlen = tvb_get_guint8(tvb, 1);
 
 	if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
--- Makefile.am.orig	2004-03-25 16:21:15.000000000 -0600
+++ Makefile.am	2004-03-30 12:07:33.145590000 -0600
@@ -198,8 +199,8 @@
 # Additional libs that I know how to build. These will be
 # linked into the ethereal executable.
 ethereal_additional_libs = \
-	wiretap/libwiretap.la	\
 	gtk/libui.a		\
+	wiretap/libwiretap.la	\
 	epan/libethereal.la
 
 # This is the automake dependency variable for the executable