Wireshark-dev: Re: [Wireshark-dev] gtk/capture_dlg.h

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 20 Aug 2011 12:31:25 -0700
On Aug 20, 2011, at 12:22 PM, Gisle Vanem wrote:

> Building w/o HAVE_PCAP_REMOTE or HAVE_PCAP_SETSAMPLING, I
> got this error from MSVC:
> 
> file_dlg_win32.c
> G:\MingW32\src\inet\Wireshark\gtk\capture_dlg.h(58) : error C2016: C  requires that a struct or union has at least one member
> 
> Can be solved by adding a dummy value:
> 
> --- SVN-Latest\gtk\capture_dlg.h        Wed Aug 17 17:16:30 2011
> +++ gtk\capture_dlg.h   Wed Aug 17 22:28:27 2011
> @@ -55,6 +55,7 @@
>    capture_sampling sampling_method;
>    int sampling_param;
> #endif
> +  int dummy;
> } remote_options;

It looks as if it can also be solved by not even declaring that structure if HAVE_PCAP_REMOTE isn't defined, as it doesn't appear to be used if HAVE_PCAP_REMOTE isn't defined.  I've checked in a change to do that (revision 38629).