# HG changeset patch # User chegar # Date 1574338468 0 # Node ID 7b10581e9632f90b1308e823a93789e99bbb1864 # Parent 696e6a7e3b6a3532512f9e4f2bab86e7d23e29ae 8232097: (sctp) SctpNet.init() results in java.lang.UnsatisfiedLinkError Reviewed-by: alanb diff -r 696e6a7e3b6a -r 7b10581e9632 src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java --- a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Thu Nov 21 12:14:26 2019 +0000 +++ b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Thu Nov 21 12:14:28 2019 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -991,15 +991,4 @@ return SctpChannelImpl.send0(fd, address, length, addr, port, assocId, streamNumber, unordered, ppid); } - - static { - IOUtil.load(); /* loads nio & net native libraries */ - java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public Void run() { - System.loadLibrary("sctp"); - return null; - } - }); - } } diff -r 696e6a7e3b6a -r 7b10581e9632 src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java --- a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java Thu Nov 21 12:14:26 2019 +0000 +++ b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java Thu Nov 21 12:14:28 2019 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -335,6 +335,14 @@ static native void init(); static { + IOUtil.load(); // loads nio & net native libraries + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("sctp"); + return null; + } + }); init(); } }