[akuma] 04/05: Fixed the build failure with Java 9 (Closes: #875329)
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed Mar 7 10:12:19 GMT 2018
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository akuma.
commit c2d1247f7e41dce9c454d22cbc1ae50aebe932ed
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Wed Mar 7 11:09:43 2018 +0100
Fixed the build failure with Java 9 (Closes: #875329)
---
debian/changelog | 1 +
debian/patches/01-java9-compatibility.patch | 55 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 57 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 229943c..f5a2900 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
akuma (1.10-2) UNRELEASED; urgency=medium
* Team upload.
+ * Fixed the build failure with Java 9 (Closes: #875329)
* Standards-Version updated to 4.1.3
* Switch to debhelper level 11
diff --git a/debian/patches/01-java9-compatibility.patch b/debian/patches/01-java9-compatibility.patch
new file mode 100644
index 0000000..e4af798
--- /dev/null
+++ b/debian/patches/01-java9-compatibility.patch
@@ -0,0 +1,55 @@
+Description: Fixes the compatibility issues with Java 9
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/main/java/com/sun/akuma/JavaVMArguments.java
++++ b/src/main/java/com/sun/akuma/JavaVMArguments.java
+@@ -377,7 +377,7 @@
+ final int KERN_ARGMAX = 8;
+ final int KERN_PROCARGS2 = 49;
+ final int sizeOfInt = Native.getNativeSize(int.class);
+- IntByReference _ = new IntByReference();
++ IntByReference ref = new IntByReference();
+
+
+ IntByReference argmaxRef = new IntByReference(0);
+@@ -385,7 +385,7 @@
+
+ // for some reason, I was never able to get sysctlbyname work.
+ // if(LIBC.sysctlbyname("kern.argmax", argmaxRef.getPointer(), size, NULL, _)!=0)
+- if(LIBC.sysctl(new int[]{CTL_KERN,KERN_ARGMAX},2, argmaxRef.getPointer(), size, NULL, _)!=0)
++ if(LIBC.sysctl(new int[]{CTL_KERN,KERN_ARGMAX},2, argmaxRef.getPointer(), size, NULL, ref)!=0)
+ throw new UnsupportedOperationException("Failed to get kernl.argmax: "+LIBC.strerror(Native.getLastError()));
+
+ int argmax = argmaxRef.getValue();
+@@ -424,7 +424,7 @@
+ }
+ StringArrayMemory m = new StringArrayMemory(argmax);
+ size.setValue(argmax);
+- if(LIBC.sysctl(new int[]{CTL_KERN,KERN_PROCARGS2,resolvePID(pid)},3, m, size, NULL, _)!=0)
++ if(LIBC.sysctl(new int[]{CTL_KERN,KERN_PROCARGS2,resolvePID(pid)},3, m, size, NULL, ref)!=0)
+ throw new UnsupportedOperationException("Failed to obtain ken.procargs2: "+LIBC.strerror(Native.getLastError()));
+
+
+@@ -491,19 +491,19 @@
+ final int KERN_PROC = 14;
+ final int KERN_PROC_ARGS = 7;
+
+- IntByReference _ = new IntByReference();
++ IntByReference ref = new IntByReference();
+ IntByReference sysctlArgMax = new IntByReference();
+ IntByReference size = new IntByReference();
+
+ size.setValue(4);
+- if( LIBC.sysctl(new int[]{CTL_KERN, KERN_ARGMAX}, 2, sysctlArgMax.getPointer(), size, NULL, _) != 0)
++ if( LIBC.sysctl(new int[]{CTL_KERN, KERN_ARGMAX}, 2, sysctlArgMax.getPointer(), size, NULL, ref) != 0)
+ throw new UnsupportedOperationException("Failed to sysctl kern.argmax");
+
+ int argmax = sysctlArgMax.getValue();
+ Memory m = new Memory(argmax);
+ size.setValue(argmax);
+
+- if( LIBC.sysctl(new int[]{CTL_KERN,KERN_PROC, KERN_PROC_ARGS, resolvePID(pid)}, 4, m, size, NULL, _) != 0)
++ if( LIBC.sysctl(new int[]{CTL_KERN,KERN_PROC, KERN_PROC_ARGS, resolvePID(pid)}, 4, m, size, NULL, ref) != 0)
+ throw new UnsupportedOperationException("");
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..12bc5e0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-java9-compatibility.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/akuma.git
More information about the pkg-java-commits
mailing list