Simon Rozman wrote:

However, I did stare-review your code:
- It does not introduce any new Windows API calls it has not used before.
- It compiles fine.
It also builds fine here with cl v19.11.
But using clang-cl v5, I'm getting:
  In file included from src/openvpn/argv.c:36:
  ./src/openvpn/syshead.h(368,13) :  error: typedef redefinition with different 
types ('int' vs 'enum MIB_TCP_STATE')
  typedef int MIB_TCP_STATE;
              ^
  f:\ProgramFiler-x86\WindowsKits\Include\10.0.15063.0\shared\tcpmib.h(56,3) :  
note: previous definition is here
  } MIB_TCP_STATE;
    ^
  1 error generated.

I fail to why I don't get this error with MSVC.
But the lines in syshead.h should simply not assume
MinGW is the only compiler on Windows. Line 365:

  #ifdef _WIN32
  /* Missing declarations for old-school MinGW32 or MinGW-w64 v1.x.
   */
  #if defined(__MINGW32__) && !(defined(__MINGW64_VERSION_MAJOR) && 
__MINGW64_VERSION_MAJOR < 2)
  typedef int MIB_TCP_STATE;
  #endif


--
--gv

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to