[jffi-next] 13/24: Use Library#getSymbolAddress to try and locate the jffi_save_errno function

Tim Potter tpot-guest at moszumanska.debian.org
Wed Mar 4 04:51:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

tpot-guest pushed a commit to tag 0.6.5
in repository jffi-next.

commit 308fb72dc1da5d42260600eba2035f56d7f76ede
Author: Wayne Meissner <wmeissner at gmail.com>
Date:   Wed Jan 6 20:06:59 2010 +1000

    Use Library#getSymbolAddress to try and locate the jffi_save_errno function
---
 src/com/kenai/jffi/Internals.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/com/kenai/jffi/Internals.java b/src/com/kenai/jffi/Internals.java
index 14ae7f9..d261d87 100644
--- a/src/com/kenai/jffi/Internals.java
+++ b/src/com/kenai/jffi/Internals.java
@@ -27,6 +27,11 @@ public final class Internals {
     }
 
     public static final long getErrnoSaveFunction() {
-        return Foreign.getInstance().getSaveErrnoFunction();
+        try {
+            return com.kenai.jffi.Library.getDefault().getSymbolAddress("jffi_save_errno");
+
+        } catch (Throwable t) {
+            return 0;
+        }
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jffi-next.git



More information about the pkg-java-commits mailing list