On Wed, Jul 13, 2022 at 07:12:17AM +0900, Damien Le Moal wrote: > On 7/13/22 00:49, Stefan Hajnoczi wrote: > > On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote: > >> @@ -1801,6 +1809,130 @@ static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd, > >> } > >> #endif > >> > > > > Are the functions below within #ifdef __linux__? > > We need more than that: linux AND blkzoned.h header present (meaning a > recent kernel). So the ifdef should be "#if defined(CONFIG_BLKZONED)" or > something like it, with CONFIG_BLKZONED defined for linux AND > /usr/include/linux/blkzoned.h present. Okay. Try adding the following to meson.build: config_host_data.set('HAVE_LINUX_BLKZONED_H', cc.has_header('linux/blkzoned.h')) Then: #ifdef HAVE_LINUX_BLKZONED_H ... #endif /* HAVE_LINUX_BLKZONED_H */ Stefan