mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8266797: Fix for 8266610 breaks the build on macos
Reviewed-by: dholmes, jdv
This commit is contained in:
parent
53db2a0acd
commit
b823b3ef29
1 changed files with 5 additions and 2 deletions
|
@ -32,6 +32,9 @@
|
||||||
|
|
||||||
#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
|
#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,7 +253,7 @@ handleGetLength(FD fd)
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#ifdef BLKGETSIZE64
|
#if defined(__linux__) && defined(BLKGETSIZE64)
|
||||||
if (S_ISBLK(sb.st_mode)) {
|
if (S_ISBLK(sb.st_mode)) {
|
||||||
uint64_t size;
|
uint64_t size;
|
||||||
if(ioctl(fd, BLKGETSIZE64, &size) < 0) {
|
if(ioctl(fd, BLKGETSIZE64, &size) < 0) {
|
||||||
|
@ -258,6 +261,6 @@ handleGetLength(FD fd)
|
||||||
}
|
}
|
||||||
return (jlong)size;
|
return (jlong)size;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return sb.st_size;
|
return sb.st_size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue