Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions mono/metadata/appdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,7 @@ mono_runtime_init_checked (MonoDomain *domain, MonoThreadStartCB start_cb, MonoT
mono_runtime_install_appctx_properties ();
#endif

#ifndef DISABLE_SOCKETS
mono_network_init ();
#endif

mono_console_init ();
mono_attach_init ();

Expand Down Expand Up @@ -523,10 +520,7 @@ mono_runtime_cleanup (MonoDomain *domain)
mono_gc_cleanup ();

mono_thread_cleanup ();

#ifndef DISABLE_SOCKETS
mono_network_cleanup ();
#endif
mono_marshal_cleanup ();

mono_type_initialization_cleanup ();
Expand Down
17 changes: 15 additions & 2 deletions mono/metadata/w32socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#include <config.h>

#ifndef DISABLE_SOCKETS
#include <mono/metadata/w32socket.h>

#if !defined(DISABLE_SOCKETS) && !defined(ENABLE_NETCORE)

#if defined(__APPLE__) || defined(__FreeBSD__)
#define __APPLE_USE_RFC_3542
Expand Down Expand Up @@ -66,7 +68,6 @@
#include <mono/utils/mono-memory-model.h>
#include <mono/utils/networking.h>
#include <mono/metadata/w32handle.h>
#include <mono/metadata/w32socket.h>
#include <mono/metadata/w32socket-internals.h>
#include <mono/metadata/w32error.h>

Expand Down Expand Up @@ -2655,4 +2656,16 @@ ves_icall_cancel_blocking_socket_operation (MonoThreadObjectHandle thread, MonoE
mono_thread_info_abort_socket_syscall_for_close (MONO_UINT_TO_NATIVE_THREAD_ID (tid));
}

#else

void
mono_network_init (void)
{
}

void
mono_network_cleanup (void)
{
}

#endif /* #ifndef DISABLE_SOCKETS */