Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/java8-openjdk
diff options
context:
space:
mode:
Diffstat (limited to 'extra/java8-openjdk')
-rw-r--r--extra/java8-openjdk/PKGBUILD19
-rw-r--r--extra/java8-openjdk/hotspot-jdk8u181-b13-readdir_r.patch25
2 files changed, 44 insertions, 0 deletions
diff --git a/extra/java8-openjdk/PKGBUILD b/extra/java8-openjdk/PKGBUILD
new file mode 100644
index 00000000..69209bb8
--- /dev/null
+++ b/extra/java8-openjdk/PKGBUILD
@@ -0,0 +1,19 @@
+# glibc 2.28 readdir_r -> readdir hotfix (or, let's hope readdir is
+# actually thread-safe internally)
+
+source+=('hotspot-jdk8u181-b13-readdir_r.patch')
+sha256sums+=('76b176e6ec65e90b1352cb42ebf6c47a11c9a632662c31ff413965d03e3a5d41')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /^}$/ i cd ${srcdir}/hotspot-${_repo_ver} && patch -Np1 < "${srcdir}/hotspot-jdk8u181-b13-readdir_r.patch"
+ '
+)"
+
+eval "$(
+ declare -f build | \
+ sed '
+ s/-Wno-error=deprecated-declarations/-Wno-error=deprecated-declarations -Wno-error=deprecated/
+ '
+)"
diff --git a/extra/java8-openjdk/hotspot-jdk8u181-b13-readdir_r.patch b/extra/java8-openjdk/hotspot-jdk8u181-b13-readdir_r.patch
new file mode 100644
index 00000000..2da9545c
--- /dev/null
+++ b/extra/java8-openjdk/hotspot-jdk8u181-b13-readdir_r.patch
@@ -0,0 +1,25 @@
+diff -rauN hotspot-jdk8u181-b13/src/os/linux/vm/os_linux.inline.hpp hotspot-jdk8u181-b13-readdir_r-patch/src/os/linux/vm/os_linux.inline.hpp
+--- hotspot-jdk8u181-b13/src/os/linux/vm/os_linux.inline.hpp 2018-07-04 03:01:40.000000000 +0200
++++ hotspot-jdk8u181-b13-readdir_r-patch/src/os/linux/vm/os_linux.inline.hpp 2018-08-29 16:58:42.460758701 +0200
+@@ -117,18 +117,10 @@
+ inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
+ {
+ dirent* p;
+- int status;
+ assert(dirp != NULL, "just checking");
+-
+- // NOTE: Linux readdir_r (on RH 6.2 and 7.2 at least) is NOT like the POSIX
+- // version. Here is the doc for this function:
+- // http://www.gnu.org/manual/glibc-2.2.3/html_node/libc_262.html
+-
+- if((status = ::readdir_r(dirp, dbuf, &p)) != 0) {
+- errno = status;
+- return NULL;
+- } else
+- return p;
++
++ p = ::readdir(dirp);
++ return p;
+ }
+
+ inline int os::closedir(DIR *dirp) {