<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face="Courier New">I finally got the first step of the tutorial to
compile with MingW. This took a number (7) of fixes:<BR></FONT></DIV>
<DIV><BR><FONT face="Courier New">1. Add "-DHAVE_REMOTE" to "CFLAGS" in the
relevant make files<BR><BR><BR>2. Add "../libpcap/Win32/Src/gai_strerror.o" to
the object list in wpcapsrc_3_1\wpcap\PRJ\GNUmakefile<BR><BR><BR>3. Copy "struct
bpf_stat {...};" from wpcapsrc_3_1\Common\Packet32.h to
wpcapsrc_3_1\wpcap\libpcap\pcap-bpf.h<BR><BR><BR>4. Comment out "#define
IN_MULTICAST..." from wpcap\libpcap\Win32\Include\ip6_misc.h<BR><BR><BR>5. Add
'pcap_findalldevs_ex' to Wpcap_no_extensions.def'<BR><BR><BR>6. Change line 678
in wpcapsrc_3_1\wpcap\libpcap\inet.c as per:<BR>### Begin
###<BR>678c678,679<BR>< (char*)tUstr += strlen(tAstr) +
1;;<BR>---<BR>> // (char*)tUstr += strlen(tAstr) +
1;;<BR>> tUstr = (WCHAR*)(((char*)tUstr) + strlen(tAstr) +
1);<BR>### End ###<BR><BR><BR>7. Add file
wpcapsrc_3_1\wpcap\libpcap\Win32\Src\gai_strerror.c:<BR>### Begin ###<BR>#define
WIN32_LEAN_AND_MEAN<BR>#include <windows.h><BR><BR>#define
GAI_STRERROR_BUFFER_SIZE 1024<BR>//#define WS2TCPIP_INLINE extern
inline<BR>#define WS2TCPIP_INLINE __stdcall<BR><BR>WS2TCPIP_INLINE<BR>char
*<BR>gai_strerrorA(<BR> IN int
ecode)<BR>{<BR> DWORD dwMsgLen;<BR> static
char buff[GAI_STRERROR_BUFFER_SIZE + 1];<BR><BR> dwMsgLen =
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM<BR>
|FORMAT_MESSAGE_IGNORE_INSERTS<BR>
|FORMAT_MESSAGE_MAX_WIDTH_MASK,<BR>
NULL,<BR>
ecode,<BR>
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),<BR>
(LPSTR)buff,<BR>
GAI_STRERROR_BUFFER_SIZE,<BR>
NULL);<BR><BR> return
buff;<BR>}<BR><BR>WS2TCPIP_INLINE<BR>WCHAR
*<BR>gai_strerrorW(<BR> IN int ecode<BR>
)<BR>{<BR> DWORD dwMsgLen;<BR> static WCHAR
buff[GAI_STRERROR_BUFFER_SIZE + 1];<BR><BR> dwMsgLen =
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM<BR>
|FORMAT_MESSAGE_IGNORE_INSERTS<BR>
|FORMAT_MESSAGE_MAX_WIDTH_MASK,<BR>
NULL,<BR>
ecode,<BR>
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),<BR>
(LPWSTR)buff,<BR>
GAI_STRERROR_BUFFER_SIZE,<BR>
NULL);<BR><BR> return buff;<BR>}<BR>### End ###
<BR></FONT></DIV></BODY></HTML>