summaryrefslogtreecommitdiff
path: root/net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch')
-rw-r--r--net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch b/net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch
new file mode 100644
index 000000000000..788a48040b17
--- /dev/null
+++ b/net-p2p/freenet/files/0.7.5_p1491-update-for-jna-5.x.patch
@@ -0,0 +1,31 @@
+From 830b4bb3948bd69fbd9b10001940f1775051114a Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sun, 23 Jan 2022 10:09:17 -0800
+Subject: [PATCH] Replace Pointer.SIZE with Native.POINTER_SIZE for JNA 5.x
+
+This patch is backward compatible with JNA 4.x because
+Native.POINTER_SIZE is present in both 4.x and 5.x.
+
+Bug: https://github.com/kaitoy/pcap4j/issues/191
+Bug: https://bugs.gentoo.org/830847
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/freenet/io/comm/UdpSocketHandler.java | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/freenet/io/comm/UdpSocketHandler.java b/src/freenet/io/comm/UdpSocketHandler.java
+index 0cd975f16..c004613a9 100644
+--- a/src/freenet/io/comm/UdpSocketHandler.java
++++ b/src/freenet/io/comm/UdpSocketHandler.java
+@@ -120,7 +120,7 @@ public class UdpSocketHandler implements PrioRunnable, PacketSocketHandler, Port
+ return false;
+ int ret = -1;
+ try {
+- ret = socketOptionsHolder.setsockopt(fd, SOCKET_level.IPPROTO_IPV6.linux, p.option_name.linux, new IntByReference(p.linux).getPointer(), Pointer.SIZE);
++ ret = socketOptionsHolder.setsockopt(fd, SOCKET_level.IPPROTO_IPV6.linux, p.option_name.linux, new IntByReference(p.linux).getPointer(), Native.POINTER_SIZE);
+ } catch(Exception e) { Logger.normal(UdpSocketHandler.class, e.getMessage(),e); } //if it fails that's fine
+ return (ret == 0 ? true : false);
+ }
+--
+2.34.1
+