Ethereal-dev: Re: [Ethereal-dev] Problem building ethereal 0.10.12 without libpcap

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 09 Sep 2005 01:17:46 -0700
Magnus Ljung wrote:

Looking through the code I see that ETHEREAL_STOCK_CAPTURE_START is only
defined when HAVE_LIBPCAP is set, perhaps it should be set even if it is
unset?

No, it shouldn't be used if HAVE_LIBPCAP isn't defined. I've checked in a fix; I've attached a patch for it.
Index: gtk/dlg_utils.c
===================================================================
--- gtk/dlg_utils.c	(revision 15735)
+++ gtk/dlg_utils.c	(working copy)
@@ -135,8 +135,10 @@
             close = stock_id;
         } else if (strcmp(stock_id, GTK_STOCK_CLEAR) == 0) {
             clear = stock_id;
+#ifdef HAVE_LIBPCAP
         } else if (strcmp(stock_id, ETHEREAL_STOCK_CAPTURE_START) == 0) {
             start = stock_id;
+#endif /* HAVE_LIBPCAP */
         } else if (strcmp(stock_id, GTK_STOCK_STOP) == 0) {
             stop = stock_id;
         } else if (strcmp(stock_id, GTK_STOCK_HELP) == 0) {