mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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)
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <linux/fs.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
@ -250,7 +253,7 @@ handleGetLength(FD fd)
|
|||
if (result < 0) {
|
||||
return -1;
|
||||
}
|
||||
#ifdef BLKGETSIZE64
|
||||
#if defined(__linux__) && defined(BLKGETSIZE64)
|
||||
if (S_ISBLK(sb.st_mode)) {
|
||||
uint64_t size;
|
||||
if(ioctl(fd, BLKGETSIZE64, &size) < 0) {
|
||||
|
@ -258,6 +261,6 @@ handleGetLength(FD fd)
|
|||
}
|
||||
return (jlong)size;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return sb.st_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue