[Openvpn-devel,03/13] RtlIpv6AddressToStringW() and RtlIpv4AddressToStringW() require mstcpip.h

Message ID 20171010231130.6832-3-simon@rozman.si
State Accepted
Headers show
Series [Openvpn-devel,01/13] snwprintf() => _snwprintf() | expand

Commit Message

Simon Rozman Oct. 10, 2017, 12:11 p.m. UTC
From: Simon Rozman <simon@rozman.si>

---
 src/openvpnserv/interactive.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Selva Nair Oct. 11, 2017, 3:44 p.m. UTC | #1
Hi,

On Tue, Oct 10, 2017 at 7:11 PM, <simon@rozman.si> wrote:

> From: Simon Rozman <simon@rozman.si>
>
> ---
>  src/openvpnserv/interactive.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
> index 4b08086..2019d38 100644
> --- a/src/openvpnserv/interactive.c
> +++ b/src/openvpnserv/interactive.c
> @@ -33,6 +33,7 @@
>  #include <stdio.h>
>  #include <sddl.h>
>  #include <shellapi.h>
> +#include <mstcpip.h>
>
>  #ifdef HAVE_VERSIONHELPERS_H
>  #include <versionhelpers.h>
>

In mingw build mstcpip.h gets pulled-in though ws2tcpip.h but MSDN says to
explicitly include it for RtlIpv4AddressToStringW etc.

Anyway mingw is still happy at least with this order of includes, so looks
good to me.

ACK.

Selva
<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 10, 2017 at 7:11 PM,  <span dir="ltr">&lt;<a href="mailto:simon@rozman.si" target="_blank">simon@rozman.si</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Simon Rozman &lt;<a href="mailto:simon@rozman.si" target="_blank">simon@rozman.si</a>&gt;<br>
<br>
---<br>
 src/openvpnserv/interactive.c | 1 +<br>
 1 file changed, 1 insertion(+)<br>
<br>
diff --git a/src/openvpnserv/interactive.<wbr>c b/src/openvpnserv/interactive.<wbr>c<br>
index 4b08086..2019d38 100644<br>
--- a/src/openvpnserv/interactive.<wbr>c<br>
+++ b/src/openvpnserv/interactive.<wbr>c<br>
@@ -33,6 +33,7 @@<br>
 #include &lt;stdio.h&gt;<br>
 #include &lt;sddl.h&gt;<br>
 #include &lt;shellapi.h&gt;<br>
+#include &lt;mstcpip.h&gt;<br>
<br>
 #ifdef HAVE_VERSIONHELPERS_H<br>
 #include &lt;versionhelpers.h&gt;<br></blockquote><div><br></div><div>In mingw build mstcpip.h gets pulled-in though ws2tcpip.h but MSDN says to explicitly include it for RtlIpv4AddressToStringW etc.</div><div><br></div><div>Anyway mingw is still happy at least with this order of includes, so looks good to me.</div><div><br></div><div>ACK.</div><div><br>Selva</div></div></div></div>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Gert Doering Oct. 11, 2017, 8:55 p.m. UTC | #2
Your patch has been applied to the master and release/2.4 branch.

commit 55305a2fc66a768cbbf152da9092400590504574 (master)
commit 0e91a2ddb79f34a8cb361cda2f4d4a1df39d3c18 (release/2.4)
Author: Simon Rozman
Date:   Wed Oct 11 01:11:20 2017 +0200

     RtlIpv6AddressToStringW() and RtlIpv4AddressToStringW() require mstcpip.h

     Acked-by: Selva Nair <selva.nair@gmail.com>
     Message-Id: <20171010231130.6832-3-simon@rozman.si>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15582.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Patch

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 4b08086..2019d38 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -33,6 +33,7 @@ 
 #include <stdio.h>
 #include <sddl.h>
 #include <shellapi.h>
+#include <mstcpip.h>
 
 #ifdef HAVE_VERSIONHELPERS_H
 #include <versionhelpers.h>