On Sun, Mar 6, 2016 at 8:44 AM, Gert Doering <g...@greenie.muc.de> wrote:
> Trying to compile this on mingw 32bit, block_dns.c blows up for me > unless I add two more header files to get definitions for ADDRESS_FAMILY > and SOCKADDR_INET (which are referenced by iphlpapi.c) > > --- a/src/openvpn/block_dns.c > +++ b/src/openvpn/block_dns.c > @@ -29,6 +29,8 @@ > #include <fwpmu.h> > #include <initguid.h> > #include <fwpmtypes.h> > +#include <winsock2.h> > +#include <ws2ipdef.h> > #include <iphlpapi.h> > #include "block_dns.h" > > ... with these changes, both openvpn.exe and openvpnserv.exe compile > and link nicely. > It must have been my sloppiness. I copied the relevant snippets from win32.c and only the headers needed to compile cleanly. Did not check the docs thoroughly.. > > MS documentation says one should include <winsock2.h>, but that is not > sufficient for me. > > So, question 1: is this a mingw issue, or just a 32bit windows requirement > and you only tested on 64bit? > Strange thing is that it compiles and links without error (even with -Wall) using mingw I have here (uses gcc 4.6.3). > > question 2: shall I just add these two header files and take note in > the ACK-and-merge e-mail, or do you want to re-send a v3? > Please add the headers and the note. Thanks. Selva