Skip to content

Commit

Permalink
dns/client: fix HAVE_INET6 and win32/vcxproj: updates (#28)
Browse files Browse the repository at this point in the history
Adding missing files to project.
Add HAVE_INET6 def check around dns listener
Updated .gitignore with visual studio build folders
  • Loading branch information
johnjuuljensen authored Oct 7, 2020
1 parent 2b95fe7 commit e9aaae1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ libre.a
libre.dylib
libre.pc
libre.so

# Windows build folder
Win32/*

# Visual studio config
mk/win32/baresip.vcxproj.user
8 changes: 5 additions & 3 deletions mk/win32/re.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<ClCompile Include="..\..\src\httpauth\basic.c" />
<ClCompile Include="..\..\src\httpauth\digest.c" />
<ClCompile Include="..\..\src\http\auth.c" />
<ClCompile Include="..\..\src\http\chunk.c" />
<ClCompile Include="..\..\src\http\client.c" />
<ClCompile Include="..\..\src\http\msg.c" />
<ClCompile Include="..\..\src\http\server.c" />
Expand Down Expand Up @@ -248,6 +249,7 @@
<ClCompile Include="..\..\src\udp\udp.c" />
<ClCompile Include="..\..\src\uri\uri.c" />
<ClCompile Include="..\..\src\uri\uric.c" />
<ClCompile Include="..\..\src\websock\websock.c" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\srtp\README" />
Expand All @@ -256,17 +258,17 @@
<ProjectName>re-win32</ProjectName>
<ProjectGuid>{40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand Down
4 changes: 4 additions & 0 deletions mk/win32/re.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,10 @@
<ClCompile Include="..\..\src\sha\sha1.c">
<Filter>src\sha</Filter>
</ClCompile>
<ClCompile Include="..\..\src\websock\websock.c" />
<ClCompile Include="..\..\src\http\chunk.c">
<Filter>src\http</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\srtp\README">
Expand Down
6 changes: 4 additions & 2 deletions src/dns/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,10 +876,12 @@ int dnsc_alloc(struct dnsc **dcpp, const struct dnsc_conf *conf,
goto out;

sa_set_str(&laddr, "0.0.0.0", 0);
sa_set_str(&laddr6, "::", 0);

err = udp_listen(&dnsc->us, &laddr, udp_recv_handler, dnsc);

#ifdef HAVE_INET6
sa_set_str(&laddr6, "::", 0);
err |= udp_listen(&dnsc->us6, &laddr6, udp_recv_handler, dnsc);
#endif
if (err)
goto out;

Expand Down

0 comments on commit e9aaae1

Please sign in to comment.