This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/55989] [4.8 regresion] build failure in libsanitizer


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55989

--- Comment #1 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-15 08:49:42 UTC ---
Will the following patch work? 

Index: sanitizer_common/sanitizer_linux.cc
===================================================================
--- sanitizer_common/sanitizer_linux.cc    (revision 172519)
+++ sanitizer_common/sanitizer_linux.cc    (working copy)
@@ -369,16 +369,24 @@
 }

 bool SanitizerSetThreadName(const char *name) {
+#ifdef PR_SET_NAME
   return 0 == prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0);  // NOLINT
+#else
+  return false;
+#endif
 }

 bool SanitizerGetThreadName(char *name, int max_len) {
+#ifdef PR_GET_NAME
   char buff[17];
   if (prctl(PR_GET_NAME, (unsigned long)buff, 0, 0, 0))  // NOLINT
     return false;
   internal_strncpy(name, buff, max_len);
   name[max_len] = 0;
   return true;
+#else
+  return false;
+#endif
 }

 #ifndef SANITIZER_GO


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]