jdk/src/solaris/native/java/nio/MappedByteBuffer.c
changeset 895 67f1dc69ad10
parent 2 90ce3da70b43
child 1247 b4c26443dee5
--- a/jdk/src/solaris/native/java/nio/MappedByteBuffer.c	Thu Jul 24 12:40:30 2008 +0100
+++ b/jdk/src/solaris/native/java/nio/MappedByteBuffer.c	Thu Jul 24 12:46:41 2008 +0100
@@ -43,7 +43,11 @@
     int result = 0;
     int i = 0;
     void *a = (void *) jlong_to_ptr(address);
-    char * vec = (char *)malloc(numPages * sizeof(char));
+#ifdef __linux__
+    unsigned char *vec = (unsigned char *)malloc(numPages * sizeof(char));
+#else
+    char *vec = (char *)malloc(numPages * sizeof(char));
+#endif
 
     if (vec == NULL) {
         JNU_ThrowOutOfMemoryError(env, NULL);