--- old/make/linux/makefiles/vm.make 2013-07-01 12:59:38.000000000 -0700 +++ new/make/linux/makefiles/vm.make 2013-07-01 12:59:38.000000000 -0700 @@ -102,6 +102,11 @@ # a time and date. vm_version.o: CXXFLAGS += ${JRE_VERSION} +# Large File Support +ifneq ($(LP64), 1) +CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64 +endif # ifneq ($(LP64), 1) + ifeq ($(INCLUDE_TRACE), 1) CFLAGS += -DINCLUDE_TRACE=1 endif --- old/make/solaris/makefiles/vm.make 2013-07-01 12:59:38.000000000 -0700 +++ new/make/solaris/makefiles/vm.make 2013-07-01 12:59:38.000000000 -0700 @@ -90,6 +90,11 @@ # a time and date. vm_version.o: CXXFLAGS += ${JRE_VERSION} +# Large File Support +ifneq ($(LP64), 1) +CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64 +endif # ifneq ($(LP64), 1) + # CFLAGS_WARN holds compiler options to suppress/enable warnings. CFLAGS += $(CFLAGS_WARN) --- old/src/os/solaris/vm/os_solaris.inline.hpp 2013-07-01 12:59:39.000000000 -0700 +++ new/src/os/solaris/vm/os_solaris.inline.hpp 2013-07-01 12:59:39.000000000 -0700 @@ -93,7 +93,7 @@ inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) { assert(dirp != NULL, "just checking"); -#if defined(_LP64) || defined(_GNU_SOURCE) +#if defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64 dirent* p; int status; @@ -102,9 +102,9 @@ return NULL; } else return p; -#else // defined(_LP64) || defined(_GNU_SOURCE) +#else // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64 return ::readdir_r(dirp, dbuf); -#endif // defined(_LP64) || defined(_GNU_SOURCE) +#endif // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64 } inline int os::closedir(DIR *dirp) {