Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Sep 3, 2024
1 parent ff3eeba commit 3ba86b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'wasi'">
<Compile Include="$(CommonPath)Interop\Wasi\System.Native\Interop.GetHostName.cs"
Link="Common\Interop\Wasi\System.Native\Interop.GetHostName.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.ErrNo.cs"
Link="Common\Interop\Unix\System.Native\Interop.ErrNo.cs"/>

<Compile Include="System\Net\NameResolutionPal.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\InteropIPAddressExtensions.Unix.cs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ private static SocketError GetSocketErrorForNativeError(int error)
case (int)Interop.Sys.GetAddrInfoErrorFlags.EAI_MEMORY:
throw new OutOfMemoryException();
case (int)Interop.Sys.GetAddrInfoErrorFlags.EAI_SYSTEM:
string message = Interop.Sys.GetLastErrorInfo().GetErrorMessage();
throw new PlatformNotSupportedException(message);
throw new PlatformNotSupportedException("__WASI_ERRNO_* " + Interop.Sys.GetErrNo());
default:
Debug.Fail($"Unexpected error: {error}");
return SocketError.SocketError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
Link="Common\Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'wasi'">
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.ErrNo.cs"
Link="Common\Interop\Unix\System.Native\Interop.ErrNo.cs"/>
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Unix.cs"
Link="Common\System\Net\Internals\SocketAddressPal.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\InteropIPAddressExtensions.Unix.cs"
Expand Down
1 change: 0 additions & 1 deletion src/native/libs/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ int32_t SystemNative_GetHostEntryForName(const uint8_t* address, int32_t address
hint.ai_flags = AI_CANONNAME;
hint.ai_family = platformFamily;

printf("getaddrinfo %s\n", address);
int result = getaddrinfo((const char*)address, NULL, &hint, &info);
if (result != 0)
{
Expand Down

0 comments on commit 3ba86b1

Please sign in to comment.