[compiler-rt] reimplements GetMemoryProfile for netbsd. (#84841)

The actual solution relies on the premise /proc/self/smaps existence.
instead relying on native api like freebsd.
fixing fuzzer build too.

GitOrigin-RevId: e371ada409b225ea990b5ac0d5cafea26a6046e1
diff --git a/FuzzerUtilLinux.cpp b/FuzzerUtilLinux.cpp
index 5729448..e5409f2 100644
--- a/FuzzerUtilLinux.cpp
+++ b/FuzzerUtilLinux.cpp
@@ -44,7 +44,7 @@
 #if LIBFUZZER_LINUX || LIBFUZZER_FREEBSD
   (void)pthread_setname_np(thread.native_handle(), name.c_str());
 #elif LIBFUZZER_NETBSD
-  (void)pthread_set_name_np(thread.native_handle(), "%s", name.c_str());
+  (void)pthread_setname_np(thread.native_handle(), "%s", const_cast<char *>(name.c_str()));
 #endif
 }