ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / runtime / openjdk-23 / patches / illumos-port-24.patch
blob8fcbe5f0b0dc15e1e0b1f395dbd229ac78a80cbb
1 While we do have stafs(2) it has a different signature, is deprecated and
2 undocumented, while statvfs() gives the behaviour we actually want.
4 --- a/test/jdk/java/io/File/libGetXSpace.c Wed Apr 5 22:54:38 2023
5 +++ b/test/jdk/java/io/File/libGetXSpace.c Thu Apr 6 14:28:43 2023
6 @@ -34,9 +34,13 @@
7 #include <sys/param.h>
8 #include <sys/mount.h>
9 #else
10 +#ifdef __sun__
11 +#include <sys/statvfs.h>
12 +#else
13 #include <sys/statfs.h>
14 #endif
15 #endif
16 +#endif
18 #ifdef __cplusplus
19 extern "C" {
20 @@ -142,8 +146,13 @@
21 chars[len] = '\0';
22 (*env)->ReleaseStringChars(env, root, strchars);
24 +#ifdef __sun__
25 + struct statvfs buf;
26 + int result = statvfs(chars, &buf);
27 +#else
28 struct statfs buf;
29 int result = statfs(chars, &buf);
30 +#endif
31 free(chars);
32 if (result < 0) {
33 JNU_ThrowByNameWithLastError(env, "java/lang/RuntimeException",