[Winpcap-users] [PATCH] mingw build
Alon Bar-Lev
alon.barlev at gmail.com
Mon Sep 20 22:13:42 PDT 2010
On Tue, Sep 21, 2010 at 2:02 AM, Gianluca Varenni
<gianluca.varenni at cacetech.com> wrote:
>
>
> --------------------------------------------------
> From: "Alon Bar-Lev" <alon.barlev at gmail.com>
> Sent: Tuesday, September 14, 2010 9:17 AM
> To: <winpcap-users at winpcap.org>
> Subject: [Winpcap-users] [PATCH] mingw build
>
> > Hello,
> >
> > I needed winpcap compiled with mingw-w64 compiler cross compiled on Linux.
> > Compiles using mingw-w64 in 32bit and 64bit, not sure it works though,
> > but the fixes are unrelated and trivial.
> >
> > Attached is a patch to fix several issues:
> >
> > 1. File name casing - there are reference to files in wrong casing.
> >
> > 2. Do not use '\' in #include, use '/'.
> >
> > 3. Recent mingw headers have ntddndis.h, no need for ddk for this.
>
> I'm not sure about this. The "ddk" folder is part of (at least mine) cygwin
> installation, and it's where the ntddndis.h file is located.
So we need to specify the location not within the code but add -I to
the compiler to search for correct folders.
>
> >
> > 4. grammar.y - any idea why we need pcap_parse if yacc defines it
> > anyway instead of yyparse?
> >
> > 5. yacc does not accept -y argument.
> >
> > 6. Added -Wl,--allow-multiple-definition to remove duplicate symbol
> > for getaddrinfo and freeaddrinfo which exists in code and in winsock
> > library. I am not sure the approach of overriding a symbol is correct.
>
> I think this comes from the fact that (at least in the past) getaddrinfo and
> freeaddrinfo are not available on cygwin. I think my current installation of
> cygwin (9 months old) still lacks those functions.
Oh... not that these are buggy... so we can have HAVE_GETADDRINFO
constant for this.
Is all the other OK?
>
> Have a nice day
> GV
>
> >
> > 7. Minor modification of (char*)A += code.
> >
> > Regards,
> > Alon Bar-Lev.
> >
>
>
>
> > _______________________________________________
> > Winpcap-users mailing list
> > Winpcap-users at winpcap.org
> > https://www.winpcap.org/mailman/listinfo/winpcap-users
> >
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
More information about the Winpcap-users
mailing list