ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / runtime / openjdk-23 / patches / illumos-port-03.patch
blobd4b96559457ccfbde3a9a0286e457b01a741a733
1 --- a/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java Thu May 28 00:44:10 2020
2 +++ b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java Wed May 20 19:29:11 2020
3 @@ -112,6 +112,27 @@
6 /**
7 + * FILE* fopen(const char *filename, const char* mode);
8 + */
9 + static long fopen(UnixPath filename, String mode) throws UnixException {
10 + NativeBuffer pathBuffer = copyToNativeBuffer(filename);
11 + NativeBuffer modeBuffer = NativeBuffers.asNativeBuffer(Util.toBytes(mode));
12 + try {
13 + return fopen0(pathBuffer.address(), modeBuffer.address());
14 + } finally {
15 + modeBuffer.release();
16 + pathBuffer.release();
17 + }
18 + }
19 + private static native long fopen0(long pathAddress, long modeAddress)
20 + throws UnixException;
22 + /**
23 + * fclose(FILE* stream)
24 + */
25 + static native void fclose(long stream) throws UnixException;
27 + /**
28 * void rewind(FILE* stream);
30 static native void rewind(long stream) throws UnixException;
31 @@ -500,6 +521,25 @@
32 throws UnixException;
34 /**
35 + * long int pathconf(const char *path, int name);
36 + */
37 + static long pathconf(UnixPath path, int name) throws UnixException {
38 + NativeBuffer buffer = copyToNativeBuffer(path);
39 + try {
40 + return pathconf0(buffer.address(), name);
41 + } finally {
42 + buffer.release();
43 + }
44 + }
45 + private static native long pathconf0(long pathAddress, int name)
46 + throws UnixException;
48 + /**
49 + * long fpathconf(int fildes, int name);
50 + */
51 + static native long fpathconf(int filedes, int name) throws UnixException;
53 + /**
54 * char* strerror(int errnum)
56 static native byte[] strerror(int errnum);