[PATCH v2 12/20] block: Add including of ioctl header for Emscripten build

Kohei Tokunaga posted 20 patches 6 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 12/20] block: Add including of ioctl header for Emscripten build
Posted by Kohei Tokunaga 6 months, 3 weeks ago
Including <sys/ioctl.h> is still required on Emscripten, just like on other
platforms, to make the ioctl function available.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
 block/file-posix.c | 4 ++++
 1 file changed, 4 insertions(+)

V2:
- Split this from the previous 12th patch into a separate commit and revised
  the commit message to clarify the purpose of the patch.

diff --git a/block/file-posix.c b/block/file-posix.c
index 56d1972d15..69257c0891 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -110,6 +110,10 @@
 #include <sys/diskslice.h>
 #endif
 
+#ifdef EMSCRIPTEN
+#include <sys/ioctl.h>
+#endif
+
 /* OS X does not have O_DSYNC */
 #ifndef O_DSYNC
 #ifdef O_SYNC
-- 
2.25.1
Re: [PATCH v2 12/20] block: Add including of ioctl header for Emscripten build
Posted by Stefan Hajnoczi 6 months, 3 weeks ago
On Tue, Apr 22, 2025 at 02:27:16PM +0900, Kohei Tokunaga wrote:
> Including <sys/ioctl.h> is still required on Emscripten, just like on other
> platforms, to make the ioctl function available.
> 
> Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
> ---
>  block/file-posix.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> V2:
> - Split this from the previous 12th patch into a separate commit and revised
>   the commit message to clarify the purpose of the patch.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [PATCH v2 12/20] block: Add including of ioctl header for Emscripten build
Posted by Philippe Mathieu-Daudé 6 months, 3 weeks ago
On 22/4/25 07:27, Kohei Tokunaga wrote:
> Including <sys/ioctl.h> is still required on Emscripten, just like on other
> platforms, to make the ioctl function available.
> 
> Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
> ---
>   block/file-posix.c | 4 ++++
>   1 file changed, 4 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>