From eeeb80209fb5daa2848b76c1fe1e1da08fe8f65e Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 20 Nov 2023 15:36:04 +0100 Subject: [PATCH] Fix error after merge conflict --- android-activity/src/game_activity/mod.rs | 2 +- android-activity/src/native_activity/glue.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android-activity/src/game_activity/mod.rs b/android-activity/src/game_activity/mod.rs index c4e5561..5fc0a99 100644 --- a/android-activity/src/game_activity/mod.rs +++ b/android-activity/src/game_activity/mod.rs @@ -927,7 +927,7 @@ pub unsafe extern "C" fn _rust_glue_entry(native_app: *mut ffi::android_app) { unsafe { // Name thread - this needs to happen here after attaching to a JVM thread, // since that changes the thread name to something like "Thread-2". - let thread_name = CStr::from_bytes_with_nul(b"android_main\0").unwrap(); + let thread_name = std::ffi::CStr::from_bytes_with_nul(b"android_main\0").unwrap(); libc::pthread_setname_np(libc::pthread_self(), thread_name.as_ptr()); let app = AndroidApp::from_ptr(NonNull::new(native_app).unwrap(), jvm.clone()); diff --git a/android-activity/src/native_activity/glue.rs b/android-activity/src/native_activity/glue.rs index 8fdb280..2838d6a 100644 --- a/android-activity/src/native_activity/glue.rs +++ b/android-activity/src/native_activity/glue.rs @@ -870,7 +870,7 @@ extern "C" fn ANativeActivity_onCreate( unsafe { // Name thread - this needs to happen here after attaching to a JVM thread, // since that changes the thread name to something like "Thread-2". - let thread_name = CStr::from_bytes_with_nul(b"android_main\0").unwrap(); + let thread_name = std::ffi::CStr::from_bytes_with_nul(b"android_main\0").unwrap(); libc::pthread_setname_np(libc::pthread_self(), thread_name.as_ptr()); // We want to specifically catch any panic from the application's android_main