--- 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);