From c0fe371ab16df057ec426a80324cb09874e79575 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 20 Dec 2016 10:16:01 -0500 Subject: [PATCH] [build] Fix warning (#4177) --- mono/mini/mini-exceptions.c | 2 +- mono/mini/mini-posix.c | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index cc3aed08921..f4c1d974efa 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -2535,7 +2535,7 @@ mono_handle_native_crash (const char *signal, void *ctx, MONO_SIG_HANDLER_INFO_T #if defined(PLATFORM_ANDROID) /* SYS_fork is defined to be __NR_fork which is not defined in some ndk versions */ g_assert_not_reached (); -#elif defined(SYS_fork) +#elif !defined(PLATFORM_MACOSX) && defined(SYS_fork) pid = (pid_t) syscall (SYS_fork); #elif defined(PLATFORM_MACOSX) && HAVE_FORK pid = (pid_t) fork (); diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c index f07b84d47f6..56225b1d33c 100644 --- a/mono/mini/mini-posix.c +++ b/mono/mini/mini-posix.c @@ -839,23 +839,6 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid) #else -pid_t -mono_runtime_syscall_fork () -{ -#if defined(PLATFORM_ANDROID) - /* SYS_fork is defined to be __NR_fork which is not defined in some ndk versions */ - g_assert_not_reached (); - return 0; -#elif defined(SYS_fork) - return (pid_t) syscall (SYS_fork); -#elif defined(PLATFORM_MACOSX) && HAVE_FORK - return (pid_t) fork (); -#else - g_assert_not_reached (); - return 0; -#endif -} - static gboolean native_stack_with_gdb (pid_t crashed_pid, const char **argv, FILE *commands, char* commands_filename) { -- 2.25.1