equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
25 |
25 |
26 package sun.net.sdp; |
26 package sun.net.sdp; |
27 |
27 |
28 import java.io.IOException; |
28 import java.io.IOException; |
29 import java.io.FileDescriptor; |
29 import java.io.FileDescriptor; |
30 import java.security.AccessController; |
|
31 |
30 |
32 import jdk.internal.access.SharedSecrets; |
31 import jdk.internal.access.SharedSecrets; |
33 import jdk.internal.access.JavaIOFileDescriptorAccess; |
32 import jdk.internal.access.JavaIOFileDescriptorAccess; |
34 import sun.security.action.GetPropertyAction; |
33 import sun.security.action.GetPropertyAction; |
35 |
34 |
73 private static native int create0() throws IOException; |
72 private static native int create0() throws IOException; |
74 |
73 |
75 private static native void convert0(int fd) throws IOException; |
74 private static native void convert0(int fd) throws IOException; |
76 |
75 |
77 static { |
76 static { |
78 AccessController.doPrivileged( |
77 jdk.internal.loader.BootLoader.loadLibrary("net"); |
79 new java.security.PrivilegedAction<Void>() { |
|
80 public Void run() { |
|
81 System.loadLibrary("net"); |
|
82 return null; |
|
83 } |
|
84 }); |
|
85 } |
78 } |
86 } |
79 } |