[Openvpn-devel] win32: add missing include header

Message ID 20210513140039.265-1-lstipakov@gmail.com
State Accepted
Headers show
Series [Openvpn-devel] win32: add missing include header | expand

Commit Message

Lev Stipakov May 13, 2021, 4 a.m. UTC
From: Lev Stipakov <lev@openvpn.net>

Commit 5a571fb0 ("Move utility function from win32.c to win32-util.c")
moved some functions from win32.[ch] to a new win32-util.[ch], but missed
adding new include header, which results in compilation errors like:

    >cryptoapi.c
    >C:\Users\lev\Projects\openvpn\src\openvpn\cryptoapi.c(755,53): error C2220: the following warning is treated as an error
    >C:\Users\lev\Projects\openvpn\src\openvpn\cryptoapi.c(755,53): warning C4047: '=': 'const void *' differs in levels of indirection from 'int'

Fix by adding #include "win32-util.h" to "win32.h".

While on it, update vcxproj.filters with a new header so that
it looks "correct" in VS project view.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
 src/openvpn/openvpn.vcxproj.filters | 3 +++
 src/openvpn/win32.h                 | 1 +
 2 files changed, 4 insertions(+)

Comments

Gert Doering May 17, 2021, 1:18 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

As discussed on IRC.

Your patch has been applied to the master branch.

commit f1ae83ada4f4c8bb42f40ff87d77af34f627bffa
Author: Lev Stipakov
Date:   Thu May 13 17:00:39 2021 +0300

     win32: add missing include header

     Signed-off-by: Lev Stipakov <lev@openvpn.net>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20210513140039.265-1-lstipakov@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22379.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/openvpn.vcxproj.filters b/src/openvpn/openvpn.vcxproj.filters
index a4dbb6cd..3b75eecd 100644
--- a/src/openvpn/openvpn.vcxproj.filters
+++ b/src/openvpn/openvpn.vcxproj.filters
@@ -518,6 +518,9 @@ 
     <ClInclude Include="ssl_util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="win32-util.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="openvpn_win32_resources.rc">
diff --git a/src/openvpn/win32.h b/src/openvpn/win32.h
index 23573835..f075e0ae 100644
--- a/src/openvpn/win32.h
+++ b/src/openvpn/win32.h
@@ -30,6 +30,7 @@ 
 #include "mtu.h"
 #include "openvpn-msg.h"
 #include "argv.h"
+#include "win32-util.h"
 
 /* location of executables */
 #define SYS_PATH_ENV_VAR_NAME "SystemRoot"  /* environmental variable name that normally contains the system path */