RFR: 8269074: (fs) Files.copy fails to copy from /proc on some linux kernel versions [v2]

Brian Burkhalter bpb at openjdk.java.net
Tue Jun 22 18:59:55 UTC 2021


On Tue, 22 Jun 2021 18:47:52 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/unix/native/libnio/fs/UnixCopyFile.c line 40:
>> 
>>> 38: #include "sun_nio_fs_UnixCopyFile.h"
>>> 39: 
>>> 40: #if ! defined(_ALLBSD_SOURCE)
>> 
>> The "#if  ! defined(_ALLBSD_SOURCE)" looks odd here. Maybe we can get rid of it, it doesn't matter if this tiny function is compiled on macOS.
>
> OK

I moved `transfer()` so it is complied on all platforms, but it could cleanly be in an `#else` branch of the conditional compilation


#if defined(_ALLBSD_SOURCE)
int fcopyfile_callback(int what, int stage, copyfile_state_t state,
    const char* src, const char* dst, void* cancel)

-------------

PR: https://git.openjdk.java.net/jdk/pull/4543


More information about the nio-dev mailing list