Hi, On Sat, Sep 17, 2016 at 9:20 AM, Gert Doering <g...@greenie.muc.de> wrote:
> In -std=c99 mode, WIN32 is not defined to be "1" anymore, but just > "#define WIN32" - so the "#if WIN32" breaks, needs to be "#ifdef WIN32" > Indeed... To depend on the compiler or system headers to define WIN32 was not a great idea anyway. Using _WIN32 or __WIN32 is probably more reliable. Or we should define WIN32 in config.h. With std=c99, it seems WIN32 gets defined by chance through some header pulled-in by syshead.h -- not something one can rely on. Compiler-defined macros with std=c99: $ x86_64-w64-mingw32-gcc -std=c99 -E -dM - </dev/null | grep WIN32 #define _WIN32 1 #define __WIN32 1 #define __WIN32__ 1 As for a quick fix, the patch takes care of misc.c, but there is an issue with block_dns.c as well. It does not include the required config.h and syshead.h at the top before #ifdef WIN32, so now the whole file gets skipped -- mea culpa, mea culpa... I think we can just remove #ifdef WIN32 from block_dns.c (its compiled only on Windows), and add config.h and syshead.h headers at the top. Then we also need -I$(top_srcdir)/src/compat in src/openvpnsev/Makefile.am as compat.h is included by syshead.h. Thanks, Selva
------------------------------------------------------------------------------
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel