[build] Fix warning (#4177)
authorLudovic Henry <ludovic@xamarin.com>
Tue, 20 Dec 2016 15:16:01 +0000 (10:16 -0500)
committerGitHub <noreply@github.com>
Tue, 20 Dec 2016 15:16:01 +0000 (10:16 -0500)
mono/mini/mini-exceptions.c
mono/mini/mini-posix.c

index cc3aed0892131a509a111f14feba6d4dc3dfbe99..f4c1d974efa41777c8f48886e4e67b022e0f6b2c 100644 (file)
@@ -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 ();
index f07b84d47f68a2c7cca51efa71532834c7ad5069..56225b1d33cd438b4b8d14690f522f8f0790def7 100644 (file)
@@ -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)
 {