Wireshark-dev: Re: [Wireshark-dev] Building wireshark-0.99.6 problems on Linux
From: Radek Vokál <rvokal@xxxxxxxxxx>
Date: Tue, 31 Jul 2007 10:42:30 +0200
Fabrizio Bertocci wrote:
> [3] On RedHat Enterprise 3, CentOS 3, and RedHat 9 the build fails
> because the file:
> gtk/export-object.c
> uses some functions that are available only on GTK 2.4 and above.
> 
> The correct fix is to #ifdef those sections to use the new API (GTK
> 2.4>) only if gtk+2.4 is available, or use the old API for older gtk.
> Attached you can find the .diff file for this.
> 

You'd better use GKT_CHECK_VERSION, see attached patch.

Also you can use my src.rpm RHEL3 version
http://people.redhat.com/rvokal/wireshark/wireshark-0.99.6-EL3.1.src.rpm

Radek

-- 
Radek Vokál <rvokal@xxxxxxxxxx>
Engineering Manager - Base Operating Systems Brno

Office: +420 532 294 111
Mobile: +420 608 437 507
Red Hat Inc.                               http://cz.redhat.com
--- wireshark-0.99.6/gtk/export_object.c.gtk24	2007-07-05 21:22:28.000000000 +0200
+++ wireshark-0.99.6/gtk/export_object.c	2007-07-11 15:43:32.000000000 +0200
@@ -32,7 +32,7 @@
 #include <gtk/gtk.h>
 
 /* This feature has not been ported to GTK1 */
-#if GTK_MAJOR_VERSION >= 2
+#if GTK_CHECK_VERSION(2,4,0)
 
 #include <alert_box.h>
 #include <simple_dialog.h>
--- wireshark-0.99.6/gtk/export_object_http.c.gtk24	2007-07-05 21:22:28.000000000 +0200
+++ wireshark-0.99.6/gtk/export_object_http.c	2007-07-11 15:43:32.000000000 +0200
@@ -33,7 +33,7 @@
 #include <gtk/gtk.h>
 
 /* This feature has not been ported to GTK1 */
-#if GTK_MAJOR_VERSION >= 2
+#if GTK_CHECK_VERSION(2,4,0)
 
 #include <epan/dissectors/packet-http.h>
 
--- wireshark-0.99.6/gtk/menu.c.gtk24	2007-07-05 21:22:28.000000000 +0200
+++ wireshark-0.99.6/gtk/menu.c	2007-07-11 15:50:15.000000000 +0200
@@ -422,7 +422,7 @@
 #endif
     ITEM_FACTORY_ENTRY("/File/Export/Selected Packet _Bytes...", "<control>H", savehex_cb,
                              0, NULL, NULL),
-#if GTK_MAJOR_VERSION >= 2
+#if GTK_CHECK_VERSION(2,4,0)
     ITEM_FACTORY_ENTRY("/File/Export/_Objects/_HTTP", NULL, eo_http_cb, 0, NULL,
 		       NULL),
 #endif