@@ -2772,6 +2772,8 @@ void os::jvm_path(char *buf, jint buflen) {
2772
2772
void linux_wrap_code (char * base, size_t size) {
2773
2773
static volatile jint cnt = 0 ;
2774
2774
2775
+ static_assert (sizeof (off_t ) == 8 , " Expected Large File Support in this file" );
2776
+
2775
2777
if (!UseOprofile) {
2776
2778
return ;
2777
2779
}
@@ -4262,7 +4264,7 @@ jlong os::Linux::fast_thread_cpu_time(clockid_t clockid) {
4262
4264
// the number of bytes written to out_fd is returned if transfer was successful
4263
4265
// otherwise, returns -1 that implies an error
4264
4266
jlong os::Linux::sendfile (int out_fd, int in_fd, jlong* offset, jlong count) {
4265
- return ::sendfile64 (out_fd, in_fd, (off64_t *)offset, (size_t )count);
4267
+ return ::sendfile (out_fd, in_fd, (off_t *)offset, (size_t )count);
4266
4268
}
4267
4269
4268
4270
// Determine if the vmid is the parent pid for a child in a PID namespace.
@@ -4940,14 +4942,14 @@ int os::open(const char *path, int oflag, int mode) {
4940
4942
oflag |= O_CLOEXEC;
4941
4943
#endif
4942
4944
4943
- int fd = ::open64 (path, oflag, mode);
4945
+ int fd = ::open (path, oflag, mode);
4944
4946
if (fd == -1 ) return -1 ;
4945
4947
4946
4948
// If the open succeeded, the file might still be a directory
4947
4949
{
4948
- struct stat64 buf64 ;
4949
- int ret = ::fstat64 (fd, &buf64 );
4950
- int st_mode = buf64 .st_mode ;
4950
+ struct stat buf ;
4951
+ int ret = ::fstat (fd, &buf );
4952
+ int st_mode = buf .st_mode ;
4951
4953
4952
4954
if (ret != -1 ) {
4953
4955
if ((st_mode & S_IFMT) == S_IFDIR) {
@@ -4984,17 +4986,17 @@ int os::open(const char *path, int oflag, int mode) {
4984
4986
int os::create_binary_file (const char * path, bool rewrite_existing) {
4985
4987
int oflags = O_WRONLY | O_CREAT;
4986
4988
oflags |= rewrite_existing ? O_TRUNC : O_EXCL;
4987
- return ::open64 (path, oflags, S_IREAD | S_IWRITE);
4989
+ return ::open (path, oflags, S_IREAD | S_IWRITE);
4988
4990
}
4989
4991
4990
4992
// return current position of file pointer
4991
4993
jlong os::current_file_offset (int fd) {
4992
- return (jlong)::lseek64 (fd, (off64_t )0 , SEEK_CUR);
4994
+ return (jlong)::lseek (fd, (off_t )0 , SEEK_CUR);
4993
4995
}
4994
4996
4995
4997
// move file pointer to the specified offset
4996
4998
jlong os::seek_to_file_offset (int fd, jlong offset) {
4997
- return (jlong)::lseek64 (fd, (off64_t )offset, SEEK_SET);
4999
+ return (jlong)::lseek (fd, (off_t )offset, SEEK_SET);
4998
5000
}
4999
5001
5000
5002
// Map a block of memory.
0 commit comments