aports/community/openjdk8-corretto/icedtea-hotspot-lfs64.patch
Celeste abc39eddbf community/openjdk8-corretto: new aport
https://github.com/corretto/corretto-8
Amazon's no-cost, multi-platform, production-ready distribution of OpenJDK 8

This aport can be cross-compiled with the same method used
for openjdk11/17/21, unlike community/openjdk8 (icedtea).
2024-09-10 03:20:26 +00:00

134 lines
4.0 KiB
Diff

--- openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp
@@ -446,14 +446,14 @@
void AttachListener::vm_start() {
char fn[UNIX_PATH_MAX];
- struct stat64 st;
+ struct stat st;
int ret;
int n = snprintf(fn, UNIX_PATH_MAX, "%s/.java_pid%d",
os::get_temp_directory(), os::current_process_id());
assert(n < (int)UNIX_PATH_MAX, "java_pid file name buffer overflow");
- RESTARTABLE(::stat64(fn, &st), ret);
+ RESTARTABLE(::stat(fn, &st), ret);
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
@@ -480,8 +480,8 @@
bool AttachListener::check_socket_file() {
int ret;
- struct stat64 st;
- ret = stat64(LinuxAttachListener::path(), &st);
+ struct stat st;
+ ret = stat(LinuxAttachListener::path(), &st);
if (ret == -1) { // need to restart attach listener.
debug_only(warning("Socket file %s does not exist - Restart Attach Listener",
LinuxAttachListener::path()));
@@ -521,12 +521,12 @@
char fn[PATH_MAX+1];
sprintf(fn, ".attach_pid%d", os::current_process_id());
int ret;
- struct stat64 st;
- RESTARTABLE(::stat64(fn, &st), ret);
+ struct stat st;
+ RESTARTABLE(::stat(fn, &st), ret);
if (ret == -1) {
snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
os::get_temp_directory(), os::current_process_id());
- RESTARTABLE(::stat64(fn, &st), ret);
+ RESTARTABLE(::stat(fn, &st), ret);
}
if (ret == 0) {
// simple check to avoid starting the attach mechanism when
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
@@ -5613,13 +5613,13 @@
int o_delete = (oflag & O_DELETE);
oflag = oflag & ~O_DELETE;
- fd = ::open64(path, oflag, mode);
+ fd = ::open(path, oflag, mode);
if (fd == -1) return -1;
//If the open succeeded, the file might still be a directory
{
- struct stat64 buf64;
- int ret = ::fstat64(fd, &buf64);
+ struct stat buf64;
+ int ret = ::fstat(fd, &buf64);
int st_mode = buf64.st_mode;
if (ret != -1) {
@@ -5696,17 +5696,17 @@
if (!rewrite_existing) {
oflags |= O_EXCL;
}
- return ::open64(path, oflags, S_IREAD | S_IWRITE);
+ return ::open(path, oflags, S_IREAD | S_IWRITE);
}
// return current position of file pointer
jlong os::current_file_offset(int fd) {
- return (jlong)::lseek64(fd, (off64_t)0, SEEK_CUR);
+ return (jlong)::lseek(fd, (off_t)0, SEEK_CUR);
}
// move file pointer to the specified offset
jlong os::seek_to_file_offset(int fd, jlong offset) {
- return (jlong)::lseek64(fd, (off64_t)offset, SEEK_SET);
+ return (jlong)::lseek(fd, (off_t)offset, SEEK_SET);
}
// This code originates from JDK's sysAvailable
@@ -5715,9 +5715,9 @@
int os::available(int fd, jlong *bytes) {
jlong cur, end;
int mode;
- struct stat64 buf64;
+ struct stat buf64;
- if (::fstat64(fd, &buf64) >= 0) {
+ if (::fstat(fd, &buf64) >= 0) {
mode = buf64.st_mode;
if (S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode)) {
/*
@@ -5732,11 +5732,11 @@
}
}
}
- if ((cur = ::lseek64(fd, 0L, SEEK_CUR)) == -1) {
+ if ((cur = ::lseek(fd, 0L, SEEK_CUR)) == -1) {
return 0;
- } else if ((end = ::lseek64(fd, 0L, SEEK_END)) == -1) {
+ } else if ((end = ::lseek(fd, 0L, SEEK_END)) == -1) {
return 0;
- } else if (::lseek64(fd, cur, SEEK_SET) == -1) {
+ } else if (::lseek(fd, cur, SEEK_SET) == -1) {
return 0;
}
*bytes = end - cur;
--- openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
@@ -88,7 +88,7 @@
inline const int os::default_file_open_flags() { return 0;}
inline jlong os::lseek(int fd, jlong offset, int whence) {
- return (jlong) ::lseek64(fd, offset, whence);
+ return (jlong) ::lseek(fd, offset, whence);
}
inline int os::fsync(int fd) {
@@ -100,7 +100,7 @@
}
inline int os::ftruncate(int fd, jlong length) {
- return ::ftruncate64(fd, length);
+ return ::ftruncate(fd, length);
}
// macros for restartable system calls