Wireshark-dev: Re: [Wireshark-dev] Status Cmake Win32 support

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Tue, 26 Nov 2013 13:15:48 +0100
Just a short note on this one, the rest after work and some testing :-)

On Sun, Nov 24, 2013 at 09:51:47PM +0000, Graham Bloice wrote:
> The above fix for gtkui then broke wiretap, and some other things, e.g.
> dumpcap, as it was picking up the gtk3 version of zlib.h, which included
> zconf.h which attempted to include unistd.h.  To fix this I modified the
> CMakeLists.txt for the affect items to put the ZLIB libraries in front of
> the GLIB ones.  This works for everything except wireshark itself.  Try as
> I might, I can't persuade CMake to put the zlib includes in front of the
> gtk-3.0 ones, the library is, but not the includes.  Manually hacking the
> wireshark.vcxproj file does allow it to build, so I'm close.

I have solved this on my system for both gtk2 and gtk3 by manually changing
gtk[23]/include/zconf.h to
#if 0    /* was set to #if 1 by ./configure */
#  define Z_HAVE_UNISTD_H
#endif

After that things worked.

Ciao
    Jörg

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.