Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 08:53, Kohei Tokunaga wrote: The following is the patch updates file-posix.c to solve this error:  #ifndef HAVE_COPY_FILE_RANGE -static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd, -                             off_t *out_off, size_t len, unsigned int flags) +ssize_

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-17 Thread Kohei Tokunaga
Hi Philippe, > If meson fails to link, it won't define HAVE_COPY_FILE_RANGE, Yes, meson correctly detects the link failure when checking for copy_file_range, as shown in meson-log.txt: > wasm-ld: error: /tmp/emscripten_temp_oqvz296m/testfile_0.o: undefined symbol: copy_file_range and reflects t

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-17 Thread Philippe Mathieu-Daudé
On 17/4/25 11:32, Kohei Tokunaga wrote: Hi Philippe and Richard, thank you for the feedback. > Actually what about checking the symbol presence in meson? > Something like (untested): > > -- >8 -- > diff --git a/meson.build b/meson.build > index b18c46d16a2..33185fdf315 100644 > --- a/mes

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-17 Thread Kohei Tokunaga
Hi Philippe, > I'd include in this patch this hunk from patch 17: > > -- >8 -- > diff --git a/stubs/meson.build b/stubs/meson.build > index 63392f5e78..4fd4d362f9 100644 > --- a/stubs/meson.build > +++ b/stubs/meson.build > @@ -89,3 +89,7 @@ if have_system or have_user > stub_ss.add(files('hot

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-17 Thread Kohei Tokunaga
Hi Philippe and Richard, thank you for the feedback. > Actually what about checking the symbol presence in meson? > Something like (untested): > > -- >8 -- > diff --git a/meson.build b/meson.build > index b18c46d16a2..33185fdf315 100644 > --- a/meson.build > +++ b/meson.build > @@ -2654,3 +2654,2

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-16 Thread Richard Henderson
On 4/16/25 02:33, Philippe Mathieu-Daudé wrote: On 16/4/25 11:00, Philippe Mathieu-Daudé wrote: On 16/4/25 10:14, Kohei Tokunaga wrote: emscripten exposes copy_file_range declaration but doesn't provide the implementation in the final link. Define the emscripten-specific stub function to avoid

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-16 Thread Philippe Mathieu-Daudé
On 16/4/25 11:00, Philippe Mathieu-Daudé wrote: On 16/4/25 10:14, Kohei Tokunaga wrote: emscripten exposes copy_file_range declaration but doesn't provide the implementation in the final link. Define the emscripten-specific stub function to avoid type conflict with the emscripten's header. Sign

Re: [PATCH 12/19] block: Update block to compile with Emscripten

2025-04-16 Thread Philippe Mathieu-Daudé
On 16/4/25 10:14, Kohei Tokunaga wrote: emscripten exposes copy_file_range declaration but doesn't provide the implementation in the final link. Define the emscripten-specific stub function to avoid type conflict with the emscripten's header. Signed-off-by: Kohei Tokunaga --- block/file-posix

[PATCH 12/19] block: Update block to compile with Emscripten

2025-04-16 Thread Kohei Tokunaga
emscripten exposes copy_file_range declaration but doesn't provide the implementation in the final link. Define the emscripten-specific stub function to avoid type conflict with the emscripten's header. Signed-off-by: Kohei Tokunaga --- block/file-posix.c | 6 ++ stubs/emscripten.c | 13 +++