diff src/os/linux/vm/attachListener_linux.cpp @ 50:485d403e94e1

6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers Summary: (for Serguei) Allow for Linux builds with Sun Studio Linux compilers Reviewed-by: sspitsyn, ohair
author dcubed
date Wed, 12 Mar 2008 18:37:03 -0700
parents a61af66fc99e
children d1605aabd0a1
line wrap: on
line diff
--- a/src/os/linux/vm/attachListener_linux.cpp	Wed Mar 12 18:09:34 2008 -0700
+++ b/src/os/linux/vm/attachListener_linux.cpp	Wed Mar 12 18:37:03 2008 -0700
@@ -232,7 +232,7 @@
   // where <ver> is the protocol version (1), <cmd> is the command
   // name ("load", "datadump", ...), and <arg> is an argument
   int expected_str_count = 2 + AttachOperation::arg_count_max;
-  int max_len = (strlen(ver_str) + 1) + (AttachOperation::name_length_max + 1) +
+  const int max_len = (sizeof(ver_str) + 1) + (AttachOperation::name_length_max + 1) +
     AttachOperation::arg_count_max*(AttachOperation::arg_length_max + 1);
 
   char buf[max_len];